protected void btnSave_Click(object sender, EventArgs e) { EciRequest request = new EciRequest(MESService.MesBdJjlxSave); request.IsAdd = this.key.NullOrEmpty(); MES_BD_JJLX saveEntity = new MES_BD_JJLX(); request.Entity = saveEntity; saveEntity.Data = this.GetEntityFromUI().Data; saveEntity.GUID = this.key; EciResponse response = SOA.Execute(request); MES_BD_JJLX data = response.Entity.Upgrade <MES_BD_JJLX>(); if (request.IsAdd) { this.key = data.GUID; this.btnAdd.Enabled = true; //this.txtCreateDate.Text = DateTime.Now.ToFullString(); //this.txtCreateUser.Text = this.UserInfo.UserName; } //this.txtUpdateDate.Text = DateTime.Now.ToFullString(); //this.txtUpdateUser.Text = this.UserInfo.UserName; response.Message.Tip(); }
public EntityBase Save(BLLContext context, EntityBase saveEntity, bool isAdd) { MES_BD_JJLX mesBdJjlx = new MES_BD_JJLX(MES_BD_JJLX.Fields.GUID); mesBdJjlx.Data = saveEntity.Data; mesBdJjlx.EffectDataFields(); val.SaveValidate(context, mesBdJjlx, isAdd); if (isAdd) { mesBdJjlx.GUID = Guid.NewGuid().ToString("N"); mesBdJjlx.AddUserInfo(context, isAdd); mesBdJjlx.Validate(); mesBdJjlx.Insert(context.Transaction); } else { mesBdJjlx.AddUserInfo(context, isAdd); mesBdJjlx.NotSave("CREATE_DATE,CREATE_USER"); mesBdJjlx.Validate(); mesBdJjlx.Update(context.Transaction); } return(mesBdJjlx); }
private void LoadRecord() { EciRequest request = new EciRequest(MESService.MesBdJjlxLoad); request.Key = this.key; EciResponse response = SOA.Execute(request); MES_BD_JJLX data = response.DataTable.ToEntity <MES_BD_JJLX>(); this.Bind(data); }
/// <summary> /// 保存验证 /// </summary> /// <param name="context"></param> /// <param name="eciDataGroup"></param> /// <param name="isAdd"></param> public void SaveValidate(BLLContext context, MES_BD_JJLX mesBdJjlx, bool isAdd) { }