public static List <SelectListItem> FillPlanDropDown()
        {
            List <SelectListItem> list = new List <SelectListItem>();

            using (LIC_CMSEntities db = new LIC_CMSEntities())
            {
                foreach (var item in db.PLAN_MASTER.ToList())
                {
                    list.Add(new SelectListItem {
                        Text  = item.PLAN_NAME,
                        Value = item.PLAN_ID.ToString()
                    });
                }
            }
            return(list);
        }
Example #2
0
 public static bool insertUserDetail(UserDetailModel model)
 {
     using (LIC_CMSEntities db = new LIC_CMSEntities())
     {
         db.USER_DETAIL_MASTER.Add(new USER_DETAIL_MASTER {
             FIRST_NAME  = model.FIRST_NAME,
             MIDDLE_NAME = model.MIDDLE_NAME,
             LAST_NAME   = model.LAST_NAME,
             PIN_CODE    = model.PIN_CODE,
             AGENT_CODE  = model.AGENT_CODE,
             CITY_ID     = model.CITY_ID,
             ADDRESS     = model.ADDRESS,
             EMAIL       = model.EMAIL,
             MOBILE      = model.MOBILE,
         });
         db.SaveChanges();
         return(true);
     }
 }