Saturday, October 20, 2012

C# LINQ Update using multiple where

We can use LINQ update using more than one where.

  // Upadate PR_RECIVEDINVOICEs status  
         var users = from u in dataContextObj.PR_RECIVEDINVOICEs  
               where u.RecivedInvoice_PublisherInvoice == receiveBook.InvoiceNo && u.Status=="Order"  
               select u;  
         users.ToList().ForEach(u => u.Status = "Book Receive");  
         dataContextObj.SubmitChanges();  

Tuesday, October 16, 2012

UML Getting Started For Software Development



                                                        FIG: Student Consultancy System  


To create and evolve a conceptual class diagram, you need to iteratively model:


  • Classes
  • Responsibilities
  • Associations
  • Inheritance relationships
  • Composition associations
  • Vocabularies


To create and evolve a design class diagram, you need to iteratively model:


  • Classes
  • Responsibilities
  • Associations
  • Inheritance relationships
  • Composition associations
  • Interfaces


I am not describe the details that how to you will design a UML Diagram for your Application...!! i just share a link which is really great for short time UML understanding.

                        http://www.agilemodeling.com/artifacts/classDiagram.htm

Thank you.

Monday, October 15, 2012

LINQ date range search

Here i just write down the direct code for LINQ date range search

1:  internal List<Book> GetStockInRecord(Book bookObj)  
2:      {  
3:        _dataContextObj = new KARIM_INT_SECURITY_DataClassesDataContext();  
4:        List<Book> bookLsit = new List<Book>();  
5:        foreach (var p in (from j in _dataContextObj.Stock_Ins  
6:                  where j.StockDate >= bookObj.StockFromDate && j.StockDate <= bookObj.StockToDate  
7:                  select j).Distinct())  
8:        {  
9:          Book aBook = new Book();  
10:          aBook.BookId = (int) p.BookId;  
11:          aBook.BookIsbnNo = p.AD_BOOK.Book_BookIsbnNo;  
12:          aBook.BookTitle = p.AD_BOOK.Book_BookTitle;  
13:          aBook.BookAuthorName = p.AD_BOOK.Book_BookAuthor;  
14:          aBook.BookBinding = p.AD_BOOK.Book_BookBinding;  
15:          aBook.BookCategoryName = p.AD_BOOK.Book_BookCategory;  
16:          aBook.BookCurrencyName = p.AD_BOOK.Book_Currency;  
17:          aBook.BookEdition = p.AD_BOOK.Book_BookEdition;  
18:          aBook.BookPrice = (decimal)p.AD_BOOK.Book_BookPrice;  
19:          aBook.BookPublisherName = p.AD_BOOK.Book_BookPublisher;  
20:          aBook.BookYearOfPublication = p.AD_BOOK.Book_BookYearOfPublication;  
21:          bookLsit.Add(aBook);  
22:        }  
23:        return bookLsit;  
24:      }  

Saturday, October 13, 2012

wcf ria domain services getting started

WCF ria domain service is one of most important technique for Silverlight application. When i start work on Domain service for Silverlight application here i found 2 thing:

1. what is wcf ria domain service...?
    http://stackoverflow.com/questions/3684421/what-is-wcf-ria-services
2. How to implement it...?
   http://www.silverlightshow.net/items/WCF-RIA-Services-Part-1-Getting-Started.aspx#addComment


Thank you.

Sunday, October 7, 2012

WPF role based window access

 Application security is one of the most important part for any application. In WPF application i just want to introduce that their will be many Dashboard for different module. Each dashboard will contain their menu.

The admin will assign group, user & password. Admin will also assign the access for each dashboard menu window for each Group. when a user will login he/she will see the all dashboard but can see those menu which was assign by the admin in his group.


To be continue based on feed back...

SQL Get all Index create script from Database

To get all script from database as a create new index into another database you can use the following --Get all Index Script SELECT...