/** * private void UpdateHeaderInfo() * { * InvtBatchCAP_Header oHeader = InvtBatchCAP_Header.Load(this.REJId); * if (oHeader != null) * { * oHeader.TotalAmount = Convert.ToDecimal(Common.Utility.IsNumeric(txtTotalAmount.Text) ? txtTotalAmount.Text : "0"); * oHeader.Save(); * * // log activity (Update) * RT2020.Controls.Log4net.LogInfo(RT2020.Controls.Log4net.LogAction.Update, oHeader.ToString()); * } * } */ #endregion #region Load REJ Header Info private void LoadREJInfo() { var oHeader = InvtBatchCAP_HeaderEx.Get(this.REJId); if (oHeader != null) { txtTxNumber.Text = oHeader.TxNumber; txtTxType.Text = oHeader.TxType; cboWorkplace.SelectedValue = oHeader.WorkplaceId; cboOperatorCode.SelectedValue = oHeader.StaffId; cboStatus.Text = (oHeader.Status == 0) ? "HOLD" : "POST"; dtpRecvDate.Value = oHeader.TxDate.Value; cboSupplierList.SelectedValue = oHeader.SupplierId; txtSupplierInvoice.Text = oHeader.SupplierRefernce; txtRemarks.Text = oHeader.Remarks; txtRefNumber.Text = oHeader.Reference; txtLastUpdateOn.Text = DateTimeHelper.DateTimeToString(oHeader.ModifiedOn, false); txtLastUpdateBy.Text = StaffEx.GetStaffNumberById(oHeader.ModifiedBy); txtAmendmentRetrict.Text = oHeader.ReadOnly ? "Y" : "N"; chkAPLink.Checked = oHeader.LinkToAP; txtTotalQty.Text = InvtBatchCAP_DetailsEx.GetTotalQty(this.REJId).ToString("n0"); txtTotalAmount.Text = InvtBatchCAP_DetailsEx.GetTotalAmount(this.REJId).ToString("n2"); this.Text += oHeader.ReadOnly ? " (ReadOnly)" : ""; BindREJDetailsInfo(); } }
private void DeleteConfirmationHandler(object sender, EventArgs e) { if (((Form)sender).DialogResult == DialogResult.Yes) { InvtBatchCAP_HeaderEx.DeleteChildToo(this.REJId); //Delete(); this.Close(); } }
private void FillFromList() { cboFrom.DataSource = null; cboFrom.Items.Clear(); if (rbtnPosted.Checked) { InvtSubLedgerCAP_HeaderEx.LoadCombo(ref cboFrom, "TxNumber", false, false, string.Empty, "TxType = 'CAP'"); } else { InvtBatchCAP_HeaderEx.LoadCombo(ref cboFrom, "TxNumber", false, false, string.Empty, "TxType = 'CAP'"); } }
private void FillFromList() { InvtBatchCAP_HeaderEx.LoadCombo(ref cboFrom, "TxNumber", false); /** * cboFrom.Items.Clear(); * * string[] orderBy = { "TxNumber" }; * string sql = "TxType = '" + EnumHelper.TxType.CAP.ToString() + "'"; * * InvtBatchCAP_HeaderCollection headerList = InvtBatchCAP_Header.LoadCollection(sql, orderBy, true); * cboFrom.DataSource = headerList; * cboFrom.DisplayMember = "TxNumber"; * cboFrom.ValueMember = "HeaderId"; */ }
private void FillToList() { InvtBatchCAP_HeaderEx.LoadCombo(ref cboTo, "TxNumber", false); /** * cboTo.Items.Clear(); * * string[] orderBy = { "TxNumber" }; * string sql = "TxType = '" + EnumHelper.TxType.REJ.ToString() + "'"; * * InvtBatchCAP_HeaderCollection headerList = InvtBatchCAP_Header.LoadCollection(sql, orderBy, true); * cboTo.DataSource = headerList; * cboTo.DisplayMember = "TxNumber"; * cboTo.ValueMember = "HeaderId"; */ cboTo.SelectedIndex = cboTo.Items.Count - 1; }
private void FillToList() { cboTo.DataSource = null; cboTo.Items.Clear(); if (rbtnPosted.Checked) { InvtSubLedgerCAP_HeaderEx.LoadCombo(ref cboTo, "TxNumber", false, false, string.Empty, "TxType = 'CAP'"); } else { InvtBatchCAP_HeaderEx.LoadCombo(ref cboTo, "TxNumber", false, false, string.Empty, "TxType = 'CAP'"); } if (cboTo.Items.Count > 0) { cboTo.SelectedIndex = cboTo.Items.Count - 1; } }