protected void txtAccType_TextChanged(object sender, EventArgs e) { if (txtAccType.Text != string.Empty) { Int16 MainCode = Converter.GetSmallInteger(txtAccType.Text); A2ZACCTYPEDTO getDTO = (A2ZACCTYPEDTO.GetInformation(MainCode)); if (getDTO.AccTypeCode > 0) { txtAccType.Text = Converter.GetString(getDTO.AccTypeCode); ddlAccount.SelectedValue = Converter.GetString(getDTO.AccTypeCode); txtAccType.Focus(); } else { ddlAccount.SelectedValue = "-Select-"; String csname1 = "PopupScript"; Type cstype = GetType(); ClientScriptManager cs = Page.ClientScript; if (!cs.IsStartupScriptRegistered(cstype, csname1)) { String cstext1 = "alert('This Account Code Does not Exist in file');"; cs.RegisterStartupScript(cstype, csname1, cstext1, true); txtAccType.Focus(); gvDescription.Visible = true; gvDetails.Visible = false; BtnAccountOpenSubmit.Visible = true; btnAccountUpdate.Visible = false; } return; } } if (txtAccType.Text != string.Empty) { Int16 code = Converter.GetSmallInteger(txtAccType.Text); //string sqlquery = "SELECT ProductCode, RecordCode,Description from A2ZACCCTRL where ProductCode='" + code + "'and ControlCode='2'"; //gvDetails = DataAccessLayer.BLL.CommonManager.Instance.FillGridViewList(sqlquery, gvDetails, "A2ZCSMCUS"); A2ZACCCTRLDTO getDTO = new A2ZACCCTRLDTO(); for (int i = 0; i < gvDescription.Rows.Count; i++) { //Int16 pcode = Converter.GetSmallInteger(txtProductCode.Text); Int16 rcode = Converter.GetSmallInteger(gvDescription.Rows[i].Cells[0].Text); Int16 ccode = 2; getDTO = (A2ZACCCTRLDTO.GetInformation(code, ccode, rcode)); if (getDTO.ProductCode > 0 && getDTO.RecordCode > 0) { Label4.Text = Converter.GetString(getDTO.RecordFlag); ddlAccount.SelectedValue = Converter.GetString(getDTO.ProductCode); BtnAccountOpenSubmit.Visible = false; btnAccountUpdate.Visible = true; //gvDescription.Visible = false; //gvDetails.Visible = true; ddlAccount.Focus(); CheckBox chk = (CheckBox)gvDescription.Rows[i].Cells[0].FindControl("chkDescription"); if (Label4.Text == "1") { chk.Checked = true; } else { chk.Checked = false; } } else { CheckBox chk = (CheckBox)gvDescription.Rows[i].Cells[0].FindControl("chkDescription"); chk.Checked = false; } } } }
protected void txtAccType_TextChanged(object sender, EventArgs e) { try { if (txtAccType.Text != string.Empty) { Int16 MainCode = Converter.GetSmallInteger(txtAccType.Text); A2ZACCTYPEDTO getDTO = (A2ZACCTYPEDTO.GetInformation(MainCode)); if (getDTO.AccTypeCode > 0) { txtAccType.Text = Converter.GetString(getDTO.AccTypeCode); ddlAccount.SelectedValue = Converter.GetString(getDTO.AccTypeCode); txtAccType.Focus(); } else { ddlAccount.SelectedValue = "-Select-"; ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('This Account Code Does not Exist in file');", true); //String csname1 = "PopupScript"; //Type cstype = GetType(); //ClientScriptManager cs = Page.ClientScript; //if (!cs.IsStartupScriptRegistered(cstype, csname1)) //{ // String cstext1 = "alert('This Account Code Does not Exist in file');"; // cs.RegisterStartupScript(cstype, csname1, cstext1, true); txtAccType.Focus(); gvDescription.Visible = true; gvDetails.Visible = false; BtnAccountOpenSubmit.Visible = true; btnAccountUpdate.Visible = false; //} return; } } if (txtAccType.Text != string.Empty) { Int16 code = Converter.GetSmallInteger(txtAccType.Text); string sqlquery = "SELECT ProductCode, RecordCode,Description from A2ZACCCTRL where ProductCode='" + code + "'and ControlCode='1'"; gvDetails = DataAccessLayer.BLL.CommonManager.Instance.FillGridViewList(sqlquery, gvDetails, "A2ZCSMCUS"); A2ZACCCTRLDTO getDTO = new A2ZACCCTRLDTO(); for (int i = 0; i < gvDetails.Rows.Count; i++) { //Int16 pcode = Converter.GetSmallInteger(txtProductCode.Text); Int16 rcode = Converter.GetSmallInteger(gvDetails.Rows[i].Cells[0].Text); Int16 ccode = 1; getDTO = (A2ZACCCTRLDTO.GetInformation(code, ccode, rcode)); if (getDTO.ProductCode > 0 && getDTO.RecordCode > 0) { Label4.Text = Converter.GetString(getDTO.RecordFlag); Label5.Text = Converter.GetString(getDTO.FuncFlag); ddlAccount.SelectedValue = Converter.GetString(getDTO.ProductCode); BtnAccountOpenSubmit.Visible = false; btnAccountUpdate.Visible = true; gvDescription.Visible = false; gvDetails.Visible = true; ddlAccount.Focus(); } //else //{ // ddlAccount.SelectedValue = "-Select-"; // gvDescription.Visible = true; // gvDetails.Visible = false; // BtnAccountOpenSubmit.Visible = true; // btnAccountUpdate.Visible = false; //} CheckBox chk = (CheckBox)gvDetails.Rows[i].Cells[0].FindControl("chkUpdate"); CheckBox chk1 = (CheckBox)gvDetails.Rows[i].Cells[0].FindControl("chk1Update"); if (Label4.Text == "1") { chk.Checked = true; } else { chk.Checked = false; } if (Label5.Text == "1") { chk1.Checked = true; } else { chk1.Checked = false; } } } } catch (Exception ex) { Page.ClientScript.RegisterStartupScript(this.GetType(), "scriptkey", "<script>alert('System Error.txtAccType_TextChanged Problem');</script>"); //throw ex; } }
protected void ddlAccount_SelectedIndexChanged(object sender, EventArgs e) { if (ddlAccount.SelectedValue != "-Select-") { Int16 MainCode = Converter.GetSmallInteger(ddlAccount.SelectedValue); A2ZACCTYPEDTO getDTO = (A2ZACCTYPEDTO.GetInformation(MainCode)); if (getDTO.AccTypeCode > 0) { txtAccType.Text = Converter.GetString(getDTO.AccTypeCode); txtAccType.Focus(); gvDescription.Visible = true; gvDetails.Visible = false; BtnAccountOpenSubmit.Visible = true; btnAccountUpdate.Visible = false; } } if (ddlAccount.SelectedValue == "-Select-") { gvDescription.Visible = true; gvDetails.Visible = false; BtnAccountOpenSubmit.Visible = true; btnAccountUpdate.Visible = false; txtAccType.Text = string.Empty; txtAccType.Focus(); } try { if (ddlAccount.SelectedValue != "-Select-") { Int16 code = Converter.GetSmallInteger(ddlAccount.SelectedValue); Int16 ccode = 2; //string sqlquery = "SELECT ProductCode, RecordCode,Description from A2ZACCCTRL where ProductCode='" + code + "' and ControlCode='2'"; //gvDetails = DataAccessLayer.BLL.CommonManager.Instance.FillGridViewList(sqlquery, gvDetails, "A2ZCSMCUS"); for (int i = 0; i < gvDescription.Rows.Count; i++) { A2ZACCCTRLDTO getDTO = new A2ZACCCTRLDTO(); //Int16 pcode = Converter.GetSmallInteger(ddlAccount.SelectedValue); Int16 rcode = Converter.GetSmallInteger(gvDescription.Rows[i].Cells[0].Text); getDTO = (A2ZACCCTRLDTO.GetInformation(code, ccode, rcode)); if (getDTO.ProductCode > 0 && getDTO.RecordCode > 0) { Label4.Text = Converter.GetString(getDTO.RecordFlag); txtAccType.Text = Converter.GetString(code); //gvDescription.Visible = false; //gvDetails.Visible = true; BtnAccountOpenSubmit.Visible = false; btnAccountUpdate.Visible = true; CheckBox chk = (CheckBox)gvDescription.Rows[i].Cells[0].FindControl("chkDescription"); if (Label4.Text == "1") { chk.Checked = true; } else { chk.Checked = false; } } else { CheckBox chk = (CheckBox)gvDescription.Rows[i].Cells[0].FindControl("chkDescription"); chk.Checked = false; } } } } catch (Exception ex) { throw ex; } }
protected void txtAccType_TextChanged(object sender, EventArgs e) { if (txtAccType.Text != string.Empty) { A2ZACCTYPEDTO objDTO = new A2ZACCTYPEDTO(); Int16 typecls = Converter.GetSmallInteger(txtAccType.Text); objDTO = (A2ZACCTYPEDTO.GetInformation(typecls)); if (objDTO.AccTypeCode > 0) { Visible(); lbltypecls.Text = Converter.GetString(objDTO.AccTypeClass); lblType.Text = Converter.GetString(objDTO.AccTypeCode); ddlAccType.SelectedValue = Converter.GetString(objDTO.AccTypeCode); } //Response.Write("<script>alert('dsadasd');</script>"); } GetInfo(); try { Int16 code = Converter.GetSmallInteger(txtAccType.Text); //string sqlquery = "SELECT ProductCode, RecordCode,RecordFlag from A2ZACCCTRL where ProductCode='" + code + "'and ControlCode='2'"; //gvHidden = DataAccessLayer.BLL.CommonManager.Instance.FillGridViewList(sqlquery, gvHidden, "A2ZCSMCUS"); A2ZACCCTRLDTO getDTO = new A2ZACCCTRLDTO(); for (int i = 0; i < gvHidden.Rows.Count; i++) { Int16 rcode = Converter.GetSmallInteger(gvHidden.Rows[i].Cells[1].Text); Int16 ccode = 2; getDTO = (A2ZACCCTRLDTO.GetInformation(code, ccode, rcode)); if (getDTO.ProductCode > 0 && getDTO.RecordCode > 0) { Label4.Text = Converter.GetString(getDTO.RecordFlag); } if (Label4.Text == "1") { switch (rcode) { case 1: ddlCalPeriod.Visible = true; lblCalPeriod.Visible = true; break; case 2: ddlCalMethod.Visible = true; lblCalMethod.Visible = true; break; case 3: ddlLoanCalMethod.Visible = true; lblLoanCalMethod.Visible = true; break; case 4: txtInterestRate.Visible = true; lblInterestRate.Visible = true; break; case 5: txtFundRate.Visible = true; lblFundRate.Visible = true; break; case 6: ddlProdCondition.Visible = true; lblProdCondition.Visible = true; break; case 7: ddlProdIntType.Visible = true; lblProdIntType.Visible = true; break; case 8: txtMinDepositAmt.Visible = true; lblMinDepositAmt.Visible = true; break; case 9: ddlRoundFlag.Visible = true; lblRoundFlag.Visible = true; break; case 10: txtIntWithdrDays.Visible = true; lblIntWithdrDays.Visible = true; break; case 11: txtAccProcFees.Visible = true; lblAccProcFees.Visible = true; break; case 12: txtAccClosingFees.Visible = true; lblAccClosingFees.Visible = true; break; case 13: txtPeriod.Visible = true; lblPeriod.Visible = true; break; case 99: BtnSlab.Visible = true; lblSlab.Visible = true; break; } } } if (BtnUpdate.Visible == true) { lblTest.Text = "1"; Session["Test"] = lblTest.Text; } } catch (Exception ex) { throw ex; } }