private void cashBlotterBindingSource_CurrentChanged(object sender, EventArgs e) { try { CLAS.CashBlotterRow cbr = CurrentRow(); if (cbr == null) { return; } if (cbr.IsNull("CashBlotterID")) { return; } loadCBDetailData(); ApplySecurity(cbr); ApplyRowBR(); } catch (Exception x) { UIHelper.HandleUIException(x); } }
public int ConfirmManage(int fileId) { CLAS.CashBlotterRow drCB = (CLAS.CashBlotterRow)GetCurrentRow()[0]; int docId; System.Collections.Hashtable hashTable = new System.Collections.Hashtable(); hashTable["fileid"] = fileId; hashTable["cashblotterid"] = drCB.CashBlotterID; drCB.BeginEdit(); FileManager fm = myA.AtMng.GetFile(fileId); if (drCB.IsFirstConfirmNull()) { drCB.FirstConfirm = this.myA.AtMng.WorkingAsOfficer.OfficerId; docDB.DocumentRow drnew = this.myA.AtMng.GetTemplate().GenLetter(fm, "5119D", hashTable); docId = drnew.DocId; } else { drCB.SecondConfirm = this.myA.AtMng.WorkingAsOfficer.OfficerId; drCB.RemittedDate = DateTime.Now; //this.myA.CreateRelatedActivity("020", DateTime.Now, "", drCB); Add(myA.FM.CurrentFile); docDB.DocumentRow drnew = this.myA.AtMng.GetTemplate().GenLetter(fm, "5119O", hashTable); docId = drnew.DocId; } drCB.EndEdit(); return(docId); }
private void ProcessCashBlotter() { CLAS.CashBlotterRow drCB = (CLAS.CashBlotterRow)FM.GetCLASMng().DB.CashBlotter.Select("SecondConfirm is null")[0]; bool createsNewCB = false; string processMessage = "Process Cash Blotter (First Confirm)?"; if (!drCB.IsFirstConfirmNull()) { processMessage = "Process Cash Blotter (Second Confirm)?"; createsNewCB = true; } if (MessageBox.Show(processMessage, "Process Cash Blotter", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == DialogResult.Yes) { ActivityConfig.ACSeriesRow acsr; if (createsNewCB) { acsr = FM.AtMng.acMng.DB.ACSeries.FindByACSeriesId(UIHelper.AtMng.GetSetting(atriumBE.AppIntSetting.CBSecondConfirmAcId)); } else { acsr = FM.AtMng.acMng.DB.ACSeries.FindByACSeriesId(UIHelper.AtMng.GetSetting(atriumBE.AppIntSetting.CBFirstConfirmAcId)); } this.FileForm().ReadOnly = true; fACWizard facwr = new fACWizard(FM, acsr.ACSeriesId, atriumBE.ACEngine.RevType.CashBlotter, CurrentRow().CashBlotterID, null); this.FileForm().HookupWizClose(facwr); facwr.Show(); } }
protected override void BeforeChange(DataColumn dc, DataRow ddr) { CLAS.CashBlotterRow dr = (CLAS.CashBlotterRow)ddr; switch (dc.ColumnName) { case "FirstConfirm": if (!myA.CheckDomain(dr.FirstConfirm, myA.FM.Codes("OfficerList"))) { throw new AtriumException(atriumBE.Properties.Resources.BadDomainValue, dc.ColumnName, dr.Table.TableName, "Officer List"); } break; case "SecondConfirm": if (!myA.CheckDomain(dr.SecondConfirm, myA.FM.Codes("OfficerList"))) { throw new AtriumException(atriumBE.Properties.Resources.BadDomainValue, dc.ColumnName, dr.Table.TableName, "Officer List"); } break; case "OfficeID": if (!myA.CheckDomain(dr.OfficeID, myA.FM.Codes("OfficeList"))) { throw new AtriumException(atriumBE.Properties.Resources.BadDomainValue, dc.ColumnName, dr.Table.TableName, "Office List"); } break; default: break; } }
protected override void AfterAdd(DataRow row) { CLAS.CashBlotterRow dr = (CLAS.CashBlotterRow)row; string ObjectName = this.myCashBlotterDT.TableName; dr.CashBlotterID = this.myA.AtMng.PKIDGet(ObjectName, 1); dr.OfficeID = myA.FM.CurrentFile.LeadOfficeId; }
private void loadCBDetailData() { CLAS.CashBlotterRow cbr = CurrentRow(); if (cbr.CashBlotterID != cbId) { FM.GetCLASMng().DB.CBDetail.Clear(); FM.GetCLASMng().GetCBDetail().LoadByCashBlotterId(cbr.CashBlotterID); cbId = cbr.CashBlotterID; } }
public override void ApplySecurity(DataRow dr) { CLAS.CashBlotterRow cbr = (CLAS.CashBlotterRow)dr; bool okToEdit = FM.GetCLASMng().GetCashBlotter().CanEdit(cbr); UIHelper.EnableControls(cashBlotterBindingSource, okToEdit); UIHelper.EnableCommandBarCommand(tsDelete, FM.GetCLASMng().GetCashBlotter().CanDelete(cbr)); //if (okToEdit) // cmdProcessCB.Enabled = Janus.Windows.UI.InheritableBoolean.True; //else // cmdProcessCB.Enabled = Janus.Windows.UI.InheritableBoolean.False; }
private void btnGoToOfficeCB_Click(object sender, EventArgs e) { try { CLAS.CashBlotterRow cbr = FM.GetCLASMng().GetCashBlotter().Load(CurrentRow().CashBlotterID); fFile cbFile = FileForm().MainForm.OpenFile(cbr.FileID); ucBase ctl = cbFile.MoreInfo("cashblotter"); ucCashBlotterOffice cbCtl = (ucCashBlotterOffice)ctl; cbCtl.MoreInfo("cashblotter", cbr.CashBlotterID, CurrentRow().CashBlotterDetailID); } catch (Exception x) { UIHelper.HandleUIException(x); } }
private void ApplyRowBR() { bool noDetailRow = false; CLAS.CashBlotterRow cbr = CurrentRow(); if (cbr.GetCBDetailRows().Length == 0) { noDetailRow = true; } //CLAS.CBDetailRow cbdr = CurrentDetailRow(); //f (cbdr == null) // noDetailRow = true; bool noAccess = (FM.AtMng.SecurityManager.CanExecute(0, atSecurity.SecurityManager.Features.Atrium) == atSecurity.SecurityManager.ExPermissions.No); if (noDetailRow || (!cbr.IsNull("FirstConfirm") && !cbr.IsNull("SecondConfirm")) || noAccess) //CB Processed; is Final { tsProcessFirst.Enabled = Janus.Windows.UI.InheritableBoolean.False; tsProcessSecond.Enabled = Janus.Windows.UI.InheritableBoolean.False; cmdProcessCB.Enabled = Janus.Windows.UI.InheritableBoolean.False; tsSave.Enabled = Janus.Windows.UI.InheritableBoolean.False; tsDelete.Enabled = Janus.Windows.UI.InheritableBoolean.False; valuableAmountNumericEditBox.ReadOnly = true; valuableAmountNumericEditBox.BackColor = SystemColors.Control; valuableDateCalendarCombo.ReadOnly = true; valuableDateCalendarCombo.BackColor = SystemColors.Control; valuableTypeComboBox.ReadOnly = true; currencyCodeComboBox.ReadOnly = true; statusCodeComboBox.ReadOnly = true; natureOfPaymentComboBox.ReadOnly = true; paymentSourceComboBox.ReadOnly = true; commentsEditBox.ReadOnly = true; commentsEditBox.BackColor = SystemColors.Control; } else { cmdProcessCB.Enabled = Janus.Windows.UI.InheritableBoolean.True; if (!cbr.IsNull("FirstConfirm")) { tsProcessFirst.Enabled = Janus.Windows.UI.InheritableBoolean.False; tsProcessSecond.Enabled = Janus.Windows.UI.InheritableBoolean.True; } else { tsProcessFirst.Enabled = Janus.Windows.UI.InheritableBoolean.True; tsProcessSecond.Enabled = Janus.Windows.UI.InheritableBoolean.False; } tsSave.Enabled = Janus.Windows.UI.InheritableBoolean.True; tsDelete.Enabled = Janus.Windows.UI.InheritableBoolean.True; valuableAmountNumericEditBox.ReadOnly = false; valuableAmountNumericEditBox.BackColor = SystemColors.Window; valuableDateCalendarCombo.ReadOnly = false; valuableDateCalendarCombo.BackColor = SystemColors.Window; valuableTypeComboBox.ReadOnly = false; currencyCodeComboBox.ReadOnly = false; statusCodeComboBox.ReadOnly = false; natureOfPaymentComboBox.ReadOnly = false; paymentSourceComboBox.ReadOnly = false; commentsEditBox.ReadOnly = false; commentsEditBox.BackColor = SystemColors.Window; } }
public override bool CanEdit(DataRow dr) { CLAS.CashBlotterRow er = (CLAS.CashBlotterRow)dr; return(AllowEdit || myA.AtMng.SecurityManager.CanUpdate(er.FileID, atSecurity.SecurityManager.Features.CashBlotter) > atSecurity.SecurityManager.LevelPermissions.No); }
protected override void AfterUpdate(DataRow row) { CLAS.CashBlotterRow dr = (CLAS.CashBlotterRow)row; EFileBE.XmlAddToc(myA.FM.CurrentFile, "cashblotter", "Cash Blotter", "Cash Blotter", 120); }
public override bool CanAdd(DataRow parent) { CLAS.CashBlotterRow er = (CLAS.CashBlotterRow)parent; return(AllowAdd || myA.AtMng.SecurityManager.CanAdd(er.FileID, atSecurity.SecurityManager.Features.CBDetail) > atSecurity.SecurityManager.ExPermissions.No); }