Exemplo n.º 1
0
 public void Update(DbContext DbContext,MaterialBill entity)
 {
     EntityState state = DbContext.Entry(entity).State;
        if (state == EntityState.Detached)
        {
       DbContext.Entry(entity).State = EntityState.Modified;
     }
 }
Exemplo n.º 2
0
        public static void MaterialBillDTE(MaterialBillInfo info, MaterialBill entity)
        {
            if (info._IdIsDirty == 1)
            {
               entity.Id = info.Id;
               info._IdIsDirty = 0;
            }

               if (info._BillTypeIsDirty == 1)
            {
               entity.BillType = info.BillType;
               info._BillTypeIsDirty = 0;
            }

               if (info._BillClassIdIsDirty == 1)
            {
               entity.BillClassId = info.BillClassId;
               info._BillClassIdIsDirty = 0;
            }

               if (info._RefTypeIsDirty == 1)
            {
               entity.RefType = info.RefType;
               info._RefTypeIsDirty = 0;
            }

               if (info._BillClassNameIsDirty == 1)
            {
               entity.BillClassName = info.BillClassName;
               info._BillClassNameIsDirty = 0;
            }

               if (info._RefIdIsDirty == 1)
            {
               entity.RefId = info.RefId;
               info._RefIdIsDirty = 0;
            }

               if (info._RefNOIsDirty == 1)
            {
               entity.RefNO = info.RefNO;
               info._RefNOIsDirty = 0;
            }

               if (info._WareHouseIdIsDirty == 1)
            {
               entity.WareHouseId = info.WareHouseId;
               info._WareHouseIdIsDirty = 0;
            }

               if (info._BillNOIsDirty == 1)
            {
               entity.BillNO = info.BillNO;
               info._BillNOIsDirty = 0;
            }

               if (info._FormDateIsDirty == 1)
            {
               entity.FormDate = info.FormDate;
               info._FormDateIsDirty = 0;
            }

               if (info._NeedCompanyIdIsDirty == 1)
            {
               entity.NeedCompanyId = info.NeedCompanyId;
               info._NeedCompanyIdIsDirty = 0;
            }

               if (info._NeedCompanyNameIsDirty == 1)
            {
               entity.NeedCompanyName = info.NeedCompanyName;
               info._NeedCompanyNameIsDirty = 0;
            }

               if (info._NeedDepartmentIdIsDirty == 1)
            {
               entity.NeedDepartmentId = info.NeedDepartmentId;
               info._NeedDepartmentIdIsDirty = 0;
            }

               if (info._NeedDepartmentNameIsDirty == 1)
            {
               entity.NeedDepartmentName = info.NeedDepartmentName;
               info._NeedDepartmentNameIsDirty = 0;
            }

               if (info._NeedStationIdIsDirty == 1)
            {
               entity.NeedStationId = info.NeedStationId;
               info._NeedStationIdIsDirty = 0;
            }

               if (info._NeedStationNameIsDirty == 1)
            {
               entity.NeedStationName = info.NeedStationName;
               info._NeedStationNameIsDirty = 0;
            }

               if (info._NeedStaffIdIsDirty == 1)
            {
               entity.NeedStaffId = info.NeedStaffId;
               info._NeedStaffIdIsDirty = 0;
            }

               if (info._NeedStaffNameIsDirty == 1)
            {
               entity.NeedStaffName = info.NeedStaffName;
               info._NeedStaffNameIsDirty = 0;
            }

               if (info._HandleStationIdIsDirty == 1)
            {
               entity.HandleStationId = info.HandleStationId;
               info._HandleStationIdIsDirty = 0;
            }

               if (info._HandleStationNameIsDirty == 1)
            {
               entity.HandleStationName = info.HandleStationName;
               info._HandleStationNameIsDirty = 0;
            }

               if (info._HandleStaffIdIsDirty == 1)
            {
               entity.HandleStaffId = info.HandleStaffId;
               info._HandleStaffIdIsDirty = 0;
            }

               if (info._HandleStaffNameIsDirty == 1)
            {
               entity.HandleStaffName = info.HandleStaffName;
               info._HandleStaffNameIsDirty = 0;
            }

               if (info._StatusIsDirty == 1)
            {
               entity.Status = info.Status;
               info._StatusIsDirty = 0;
            }

               if (info._NoteIsDirty == 1)
            {
               entity.Note = info.Note;
               info._NoteIsDirty = 0;
            }

               if (info._SYS_OrderSeqIsDirty == 1)
            {
               entity.SYS_OrderSeq = info.SYS_OrderSeq;
               info._SYS_OrderSeqIsDirty = 0;
            }

               if (info._SYS_IsValidIsDirty == 1)
            {
               entity.SYS_IsValid = info.SYS_IsValid;
               info._SYS_IsValidIsDirty = 0;
            }

               if (info._SYS_IsDeletedIsDirty == 1)
            {
               entity.SYS_IsDeleted = info.SYS_IsDeleted;
               info._SYS_IsDeletedIsDirty = 0;
            }

               if (info._SYS_RemarkIsDirty == 1)
            {
               entity.SYS_Remark = info.SYS_Remark;
               info._SYS_RemarkIsDirty = 0;
            }

               if (info._SYS_StaffIdIsDirty == 1)
            {
               entity.SYS_StaffId = info.SYS_StaffId;
               info._SYS_StaffIdIsDirty = 0;
            }

               if (info._SYS_StationIdIsDirty == 1)
            {
               entity.SYS_StationId = info.SYS_StationId;
               info._SYS_StationIdIsDirty = 0;
            }

               if (info._SYS_DepartmentIdIsDirty == 1)
            {
               entity.SYS_DepartmentId = info.SYS_DepartmentId;
               info._SYS_DepartmentIdIsDirty = 0;
            }

               if (info._SYS_CompanyIdIsDirty == 1)
            {
               entity.SYS_CompanyId = info.SYS_CompanyId;
               info._SYS_CompanyIdIsDirty = 0;
            }

               if (info._SYS_AppIdIsDirty == 1)
            {
               entity.SYS_AppId = info.SYS_AppId;
               info._SYS_AppIdIsDirty = 0;
            }

               if (info._SYS_CreateTimeIsDirty == 1)
            {
               entity.SYS_CreateTime = info.SYS_CreateTime;
               info._SYS_CreateTimeIsDirty = 0;
            }

               if (info._SYS_ModifyTimeIsDirty == 1)
            {
               entity.SYS_ModifyTime = info.SYS_ModifyTime;
               info._SYS_ModifyTimeIsDirty = 0;
            }

               if (info._SYS_DeleteTimeIsDirty == 1)
            {
               entity.SYS_DeleteTime = info.SYS_DeleteTime;
               info._SYS_DeleteTimeIsDirty = 0;
            }
        }
Exemplo n.º 3
0
 public void Insert(DbContext DbContext,MaterialBill entity)
 {
     DbContext.Entry(entity).State = EntityState.Added;
 }
Exemplo n.º 4
0
 public void Delete(DbContext DbContext,MaterialBill  entity)
 {
     DbContext.Entry(entity).State = EntityState.Deleted;
 }