bool SaveData() { bool ret = false; CRM_JobMastResult info = Form_GetEditEntity() as CRM_JobMastResult; WCFAddUpdateResult rst = new WCFAddUpdateResult(); if (this.DataIsChanged) { CRM_JobMastLogic logic = new CRM_JobMastLogic(this); rst = logic.AddOrUpdate(info); } else { rst.KeyGuid = info.EmpJobGuid; } if (rst.KeyGuid != null) { ret = true; } else { ret = false; } return(ret); }
private void btnSubmit_Click(object sender, EventArgs e) { CRM_JobMastResult info = Form_GetEditEntity() as CRM_JobMastResult; WCFAddUpdateResult rst = new WCFAddUpdateResult(); if (this.DataIsChanged) { CRM_JobMastLogic logic = new CRM_JobMastLogic(this); rst = logic.AddOrUpdate(info); } else { rst.KeyGuid = info.EmpJobGuid; } if (rst.KeyGuid != null) { WF_AuditRecordLogic logicWF = new WF_AuditRecordLogic(this); WCFAddUpdateResult rstAudit = logicWF.SubmitBill(new Entity.UserModel.WF.WF_AuditRecordParam() { SourceTableEngName = "CRM_JobMast", SourceBillGuid = info.EmpJobGuid, SourceBillNo = info.BillNo }); if (rstAudit.Key > 0) { LoadData(); this.ShowMessage("提交成功!"); } } }