Esempio n. 1
0
 public override void OpenRecord(long Id)
 {
     base.OpenRecord(Id);
     sysSurcharge = BL.SYS.SYS_Surcharge.Load(Id, DataContext, new List <string> {
         "SYS_Entity"
     });
     sysEntity = sysSurcharge.SYS_Entity;
 }
Esempio n. 2
0
        protected override void OnNewRecord()
        {
            base.OnNewRecord();
            sysEntity    = BL.SYS.SYS_Entity.NewSurcharge;
            sysSurcharge = BL.SYS.SYS_Surcharge.New;

            sysEntity.SYS_Surcharge.Add(sysSurcharge);
        }
Esempio n. 3
0
        internal static String Save(DB.SYS_Surcharge entry, DataContext dataContext)
        {
            try
            {
                if (dataContext.EntitySystemContext.GetEntityState(entry) == System.Data.Entity.EntityState.Detached)
                {
                    dataContext.EntitySystemContext.SYS_Surcharge.Add(entry);
                }
            }
            catch (System.Data.Entity.Validation.DbEntityValidationException ex)
            {
                return(dataContext.PackageValidationException());
            }

            return("Success");
        }