Posts

Showing posts from July, 2015

Update multiple columns from other Table via Join

 update franchisees  set  franchisees.posid=temp.POSID,  franchisees.poskey=temp.[POS Key]   from franchisees f   inner join [Table_Two] temp on f.AccountCode=temp.AccountCode

Binding a Dropdownlist on a blank form to a Model using a dictionary

In my Models folder I have a class for United States that looks like this:  public class UnitedStates     {           public static readonly IDictionary Cust_States = new Dictionary<string, object>                 {{"AL", "AL"},{"AK", "AK"},{"AZ", "AZ"},{"AR", "AR"},{"CA", "CA"},{"CO", "CO"},                 {"CT", "CT"},{"DE", "DE"},{"FL", "FL"},{"GA", "GA"},{"HI", "HI"},{"ID", "ID"},                 {"IL", "IL"},{"IN", "IN"},{"IA", "IA"},{"KS", "KS"},{"KY", "KY"},{"LA", "LA"},                 {"ME", "ME"},{"MD", "MD"},{"MA", "MA"},{"MI", "MI&q