public void OnApprove() { Mouse.OverrideCursor = Cursors.Wait; try { TaiSanDamBaoProcess processTSDB = new TaiSanDamBaoProcess(); List <ClientResponseDetail> listClientResponseDetail = new List <ClientResponseDetail>(); bool ret = false; action = DatabaseConstant.Action.DUYET; ret = LockData(); List <int> lst = new List <int>(); objHDTC = new TDTD_HOP_DONG_TCHAP(); objHDTC.ID = idHDTC; objHDTC.MA_HDTC = maHDTC; lst.Add(idHDTC); objHDTC.DSACH_ID_XOA = lst.ToArray(); if (ret) { ret = processTSDB.HopDongTheChapTDTD(action, ref objHDTC, ref listClientResponseDetail); } AfterApprove(ret, listClientResponseDetail); } catch (Exception ex) { LLogging.WriteLog(System.Reflection.MethodInfo.GetCurrentMethod().ToString(), LLogging.LogType.ERR, ex); throw ex; } finally { Mouse.OverrideCursor = Cursors.Arrow; } }
public void OnSave() { if (!Validation()) { return; } GetFormData(ref objHDTC, BusinessConstant.layTrangThaiNghiepVu(tThai_NVu)); TaiSanDamBaoProcess processTSDB = new TaiSanDamBaoProcess(); List <ClientResponseDetail> listClientResponseDetail = new List <ClientResponseDetail>(); bool ret = false; if (idHDTC == 0) { ret = processTSDB.HopDongTheChapTDTD(DatabaseConstant.Action.THEM, ref objHDTC, ref listClientResponseDetail); } else { ret = processTSDB.HopDongTheChapTDTD(DatabaseConstant.Action.SUA, ref objHDTC, ref listClientResponseDetail); } AfterSave(ret, listClientResponseDetail); }