예제 #1
0
        public void CreateDistrict(string DistrictName)
        {
            var t = new DISTRICT
            {
                DistrictName = DistrictName
            };

            _dbFirms.DISTRICTs.Add(t);
            _dbFirms.SaveChanges();
        }
예제 #2
0
 public void UpdateBussinessTyep(MdlBusinessType obj)
 {
     try
     {
         BUSINESSTYPE item = _dbFirms.BUSINESSTYPEs.Where(x => x.BusinessTypeID == obj.BusinessTypeID).SingleOrDefault();
         item.BusinessTypeName = obj.BusinessTypeName;
         item.IsActive         = obj.IsActive;
         item.UpdateByUser_ID  = obj.EnteredByUser_ID;
         item.UpdateTime       = DateTime.Now;
         item.OfType           = obj.OrgTypeID;
         _dbFirms.SaveChanges();
     }
     catch
     {
     }
 }
예제 #3
0
        public void ModifyUser(MdlUserLogin model)
        {
            USER u = _dbFirms.USERs.First(i => i.UserID == model.UserID);

            u.UserName      = model.UserName;
            u.UserEmail     = model.UserEmail;
            u.UserContactNo = model.UserContactNo;
            u.EntryDate     = DateTime.Now;
            _dbFirms.SaveChanges();

            USERROLE ur = _dbFirms.USERROLEs.First(e => e.User_ID == model.UserID);

            ur.Role_ID        = model.Role_ID;
            ur.ModifyDate     = DateTime.Now;
            ur.EnterByUser_ID = model.EnterByUser_ID;
            _dbFirms.SaveChanges();
        }