private DataAccess.CoreProvince ConvertToView(CoreProvinceView v)
 {
     DataAccess.CoreProvince model = new DataAccess.CoreProvince()
     {
         IsActive     = v.IsActive,
         IsAssigned   = v.IsAssigned,
         ProvinceId   = v.ProvinceId,
         ProvinceName = v.ProvinceName
     };
     return(model);
 }
        private CoreProvinceView ConvertModelToView(DataAccess.CoreProvince v)
        {
            CoreProvinceView model = new CoreProvinceView()
            {
                IsActive     = v.IsActive,
                IsAssigned   = v.IsAssigned,
                ProvinceId   = v.ProvinceId,
                ProvinceName = v.ProvinceName
            };

            return(model);
        }
예제 #3
0
 public void UpdateProvinceToAssigned(int proId)
 {
     try
     {
         DataAccess.CoreProvince d = db.CoreProvinces.FirstOrDefault(x => x.ProvinceId == proId);
         d.IsAssigned = true;
         db.SaveChanges();
     }
     catch (Exception e)
     {
         AuditLog.ErrorLog.LogError(db, e, 0);
     }
 }