private void lkpEdtPaymentGroup_EditValueChanged(object sender, System.EventArgs e) { if (lkpEdtPayment.EditValue != null && myPaymentCodeLookupBuilder != null && lkpEdtPaymentGroup.EditValue != null && myPaymentGroupCodeLookupBuilder != null && lkpEdtPaymentGroup.EditValue.ToString() != "") { myPaymentCodeLookupBuilder.Refresh(lkpEdtPaymentGroup.EditValue.ToString()); if (((DataTable)lkpEdtPayment.Properties.DataSource).Rows.Count == 1) { lkpEdtPayment.ItemIndex = 0; lkpEdtPayment.Properties.ForceInitialize(); } lkpEdtIPP.Visible = lkpEdtPaymentGroup.EditValue.ToString() == ACMSPOS2.PaymentGroupCode.IPP; lkpEdtIPP.Enabled = lkpEdtIPP.Visible; label4.Visible = lkpEdtIPP.Visible; myPaymentGroupCode = lkpEdtPaymentGroup.Text; } if (myIPPLookupEditBuilder != null && lkpEdtIPP.Text.Length > 0) { string cmdText = "Select A.strIPP From tblBank A Inner Join tblIPP B on A.strBankCode = B.strBankCode " + " Where B.nIPPID = @nIPPID "; int ippID = ACMS.Convert.ToInt32(lkpEdtIPP.Text); ACMSDAL.TblIPP sqlIPP = new ACMSDAL.TblIPP(); DataTable table = sqlIPP.LoadData(cmdText, new string[] { "@nIPPID" }, new object[] { ippID }); if (table.Rows.Count > 0) { lkpEdtPayment.EditValue = table.Rows[0]["strIPP"]; } } }
public IPP() { configReader = new AppSettingsReader(); connString = configReader.GetValue("Main.ConnectionString", typeof(string)).ToString(); myIPP = new TblIPP(); dtblPreset = myIPP.SelectAllIPPMembership(); }
private void lkpEdtIPP_EditValueChanged(object sender, System.EventArgs e) { if (myIPPLookupEditBuilder != null && lkpEdtIPP.Text.Length > 0) { string cmdText = "Select A.strIPP From tblBank A Inner Join tblIPP B on A.strBankCode = B.strBankCode " + " Where B.nIPPID = @nIPPID "; int ippID = ACMS.Convert.ToInt32(lkpEdtIPP.EditValue); ACMSDAL.TblIPP sqlIPP = new ACMSDAL.TblIPP(); DataTable table = sqlIPP.LoadData(cmdText, new string[] { "@nIPPID" }, new object[] { ippID }); if (table.Rows.Count > 0) { lkpEdtPayment.EditValue = table.Rows[0]["strIPP"]; } } }
private void BindData() { dal.TblIPP IPP = new dal.TblIPP(); DataTable dt = IPP.SelectAll(); //cbReceipient ddlIPP.DataSource = dt; ddlIPP.ValueMember = "nIPPID"; if (IPPId != "") ddlIPP.SelectedValue = IPPId; dal.TblReceiptPayment ReceiptPayment = new dal.TblReceiptPayment(); dt = ReceiptPayment.SelectAll(); //cbReceipient ddlReceipt.DataSource = dt; ddlReceipt.ValueMember = "nPaymentID"; ddlReceipt.DisplayMember = "strReceiptNo"; }
private void frmIPP_Update_Load(object sender, System.EventArgs e) { dal.TblBank bnk = new dal.TblBank(); DataTable dt = bnk.SelectAll(); //cbReceipient ddlBank.DataSource = dt; ddlBank.ValueMember = "strBankCode"; dal.TblIPP IP = new dal.TblIPP(); IP.NIPPID = Id; dt = IP.SelectOne(); ddlBank.SelectedValue = dt.Rows[0]["strBankCode"]; CCNo.Text = dt.Rows[0]["strCreditCardNo"].ToString(); txtnMonths.Text = dt.Rows[0]["nMonths"].ToString(); }
private void BindData() { dal.TblIPP IPP = new dal.TblIPP(); DataTable dt = IPP.SelectAll(); //cbReceipient ddlIPP.DataSource = dt; ddlIPP.ValueMember = "nIPPID"; if (IPPId != "") { ddlIPP.SelectedValue = IPPId; } dal.TblReceiptPayment ReceiptPayment = new dal.TblReceiptPayment(); dt = ReceiptPayment.SelectAll(); //cbReceipient ddlReceipt.DataSource = dt; ddlReceipt.ValueMember = "nPaymentID"; ddlReceipt.DisplayMember = "strReceiptNo"; }
public void AddNewIPP(string strBankCode, int nMonths, string strCreditCardNo, string strMerchantNo) { TblIPP sqlIPP = new TblIPP(); DataTable table = sqlIPP.FillSchema("Select * from tblIPP"); DataRow r = table.NewRow(); r["StrMembershipID"] = StrMembershipID; r["DtDate"] = DateTime.Today.Date; r["StrBranchCode"] = StrBranchCode; r["StrBankCode"] = strBankCode; r["NMonths"] = nMonths; r["strCreditCardNo"] = strCreditCardNo; r["strMerchantNo"] = strMerchantNo; r["nIPPStatus"] = 3; table.Rows.Add(r); sqlIPP.SaveData(table); }
private void DeleteUselessIPP(ACMSDAL.ConnectionProvider connProvider, ACMSLogic.POS pos) { DataRow[] rowListThatHaveIPP = pos.ReceiptPaymentTable.Select("nIPPID is not null", "", DataViewRowState.CurrentRows); if (rowListThatHaveIPP.Length > 0) { TblIPP sqlIPP = new TblIPP(); sqlIPP.MainConnectionProvider = connProvider; DataTable table = sqlIPP.GetIPP(pos.StrMembershipID, pos.StrBranchCode); foreach (DataRow r in rowListThatHaveIPP) { int nIPPID = ACMS.Convert.ToInt32(r["nIPPID"]); DataRow[] rowToUpdate = table.Select("nIPPID = " + nIPPID.ToString()); if (rowToUpdate.Length > 0) { rowToUpdate[0]["nIPPStatus"] = 0; } } DataRow[] rowListToDelete = table.Select("nIPPStatus = 3", "", DataViewRowState.CurrentRows); foreach (DataRow deleteRow in rowListToDelete) { deleteRow.Delete(); } sqlIPP.SaveData(table); } }
private void lkpEdtPaymentGroup_EditValueChanged(object sender, System.EventArgs e) { if (lkpEdtPayment.EditValue != null && myPaymentCodeLookupBuilder != null && lkpEdtPaymentGroup.EditValue != null && myPaymentGroupCodeLookupBuilder != null && lkpEdtPaymentGroup.EditValue.ToString() != "") { myPaymentCodeLookupBuilder.Refresh(lkpEdtPaymentGroup.EditValue.ToString()); if (((DataTable)lkpEdtPayment.Properties.DataSource).Rows.Count == 1) { lkpEdtPayment.ItemIndex = 0; lkpEdtPayment.Properties.ForceInitialize(); } lkpEdtIPP.Visible = lkpEdtPaymentGroup.EditValue.ToString() == ACMSPOS2.PaymentGroupCode.IPP; lkpEdtIPP.Enabled = lkpEdtIPP.Visible; label4.Visible = lkpEdtIPP.Visible; myPaymentGroupCode = lkpEdtPaymentGroup.Text; } if (myIPPLookupEditBuilder != null && lkpEdtIPP.Text.Length > 0) { string cmdText = "Select A.strIPP From tblBank A Inner Join tblIPP B on A.strBankCode = B.strBankCode " + " Where B.nIPPID = @nIPPID "; int ippID = ACMS.Convert.ToInt32(lkpEdtIPP.Text); ACMSDAL.TblIPP sqlIPP = new ACMSDAL.TblIPP(); DataTable table = sqlIPP.LoadData(cmdText, new string[]{"@nIPPID"}, new object[]{ippID}); if (table.Rows.Count > 0) { lkpEdtPayment.EditValue = table.Rows[0]["strIPP"]; } } }
private void lkpEdtIPP_EditValueChanged(object sender, System.EventArgs e) { if (myIPPLookupEditBuilder != null && lkpEdtIPP.Text.Length > 0) { string cmdText = "Select A.strIPP From tblBank A Inner Join tblIPP B on A.strBankCode = B.strBankCode " + " Where B.nIPPID = @nIPPID "; int ippID = ACMS.Convert.ToInt32(lkpEdtIPP.EditValue); ACMSDAL.TblIPP sqlIPP = new ACMSDAL.TblIPP(); DataTable table = sqlIPP.LoadData(cmdText, new string[]{"@nIPPID"}, new object[]{ippID}); if (table.Rows.Count > 0) { lkpEdtPayment.EditValue = table.Rows[0]["strIPP"]; } } }
private void InitLookupEdit(int Id) { myIPP = new TblIPP(); myIPP.NIPPID = Id; dtblIPPLookupEdit = myIPP.SelectOne(); }
private void Init() { myIPP = new TblIPP(); myDataTable = myIPP.SelectAll(); }