private static string Text(BuildingRequestBussines bu) { var res = ""; try { res = Settings.Classes.Payamak.SayerText; if (res.Contains(Replacor.Request.DateSabt)) { res = res.Replace(Replacor.Request.DateSabt, bu.DateSh); } if (res.Contains(Replacor.Request.Name)) { var owner = PeoplesBussines.Get(bu.AskerGuid); res = res.Replace(Replacor.Request.Name, owner?.Name); } if (res.Contains(Replacor.Request.UserName)) { var user = UserBussines.Get(bu.UserGuid); res = res.Replace(Replacor.Request.UserName, user?.Name); } } catch (Exception ex) { WebErrorLog.ErrorInstence.StartErrorLog(ex); } return(res); }
public frmRequestMain(Guid guid, bool isShowMode) { InitializeComponent(); cls = BuildingRequestBussines.Get(guid); asker = PeoplesBussines.Get(cls.AskerGuid); ucHeader.Text = !isShowMode ? $"ویرایش تقاضای {cls.AskerName}" : $"مشاهده تقاضای {cls.AskerGuid}"; ucHeader.IsModified = cls.IsModified; superTabControlPanel1.Enabled = !isShowMode; superTabControlPanel2.Enabled = !isShowMode; superTabControlPanel3.Enabled = !isShowMode; btnFinish.Enabled = !isShowMode; superTabControl1.SelectedTab = superTabItem1; WindowState = FormWindowState.Maximized; }
private void btnCreateOwner_Click(object sender, EventArgs e) { try { var frm = new frmPeoples(); if (frm.ShowDialog(this) != DialogResult.OK) { return; } asker = PeoplesBussines.Get(frm.SelectedGuid); LoadAsker(); } catch (Exception ex) { WebErrorLog.ErrorInstence.StartErrorLog(ex); } }
private void btnsSearch_Click(object sender, EventArgs e) { try { var frm = new frmShowPeoples(true); if (frm.ShowDialog(this) != DialogResult.OK) { return; } sSide = PeoplesBussines.Get(frm.SelectedGuid); LoadsSide(); } catch (Exception ex) { WebErrorLog.ErrorInstence.StartErrorLog(ex); } }
public frmContractMain(Guid guid, bool isShowMode) { InitializeComponent(); WindowState = FormWindowState.Maximized; cls = ContractBussines.Get(guid); fSide = PeoplesBussines.Get(cls.FirstSideGuid); sSide = PeoplesBussines.Get(cls.SecondSideGuid); building = BuildingBussines.Get(cls.BuildingGuid); superTabControl1.SelectedTab = superTabItem5; superTabControl2.SelectedTab = superTabItem8; superTabControlPanel1.Enabled = !isShowMode; superTabControlPanel2.Enabled = !isShowMode; superTabControlPanel3.Enabled = !isShowMode; superTabControlPanel4.Enabled = !isShowMode; superTabControlPanel5.Enabled = !isShowMode; superTabControlPanel6.Enabled = !isShowMode; superTabControlPanel7.Enabled = !isShowMode; superTabControlPanel10.Enabled = !isShowMode; superTabControlPanel8.Enabled = !isShowMode; superTabControlPanel11.Enabled = !isShowMode; btnFinish.Enabled = !isShowMode; }