protected void btnSubmit_Click(object sender, EventArgs e) { if (ddlGroup.SelectedIndex == 0) { ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Select Group Code');", true); return; } if (txtPartyName.Text == string.Empty) { ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Input Party Name');", true); return; } try { Int16 code = Converter.GetSmallInteger(ddlGroup.SelectedValue); A2ZRECCTRLDTO getDTO = (A2ZRECCTRLDTO.GetLastRecords(code)); lblLastLPartyNo.Text = Converter.GetString(getDTO.CtrlRecLastNo); lblnewPartyNo.Text = code.ToString() + getDTO.CtrlRecLastNo.ToString("000000"); UpdateRecords(); } catch (Exception Ex) { ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Data not inserted');", true); return; } }
protected void btnUpdate_Click(object sender, EventArgs e) { try { A2ZRECCTRLDTO getDTO = (A2ZRECCTRLDTO.GetLastRecords(10)); lblLastMiscNo.Text = Converter.GetString(getDTO.CtrlRecLastNo); GenerateNewMisc(); A2ZMISCDTO objDTO = new A2ZMISCDTO(); objDTO.MiscCode = Converter.GetInteger(lblNewMiscNo.Text); objDTO.MiscName = Converter.GetString(txtMiscName.Text); int roweffect = A2ZMISCDTO.InsertInformation(objDTO); if (roweffect > 0) { UpdatedMSG(); ClearRecords(); txtMiscName.Focus(); } } catch (Exception Ex) { ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Data not inserted');", true); return; } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { lblModule.Text = Request.QueryString["a%b"]; A2ZRECCTRLDTO getDTO = (A2ZRECCTRLDTO.ReadLastRecords(6)); lblLastAppNo.Text = Converter.GetString(getDTO.CtrlRecLastNo); txtLoanAppNo.Focus(); BtnUpdate.Visible = false; ddlAccType.Enabled = false; LoanPurposeDdl(); hdnID.Text = DataAccessLayer.Utility.Converter.GetString(SessionStore.GetValue(Params.SYS_USER_ID)); //TruncateWF(); Hideinfo(); MemberDropdown(); AccTypedropdown(); } else { } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { lblModule.Text = Request.QueryString["a%b"]; A2ZCSPARAMETERDTO dto = A2ZCSPARAMETERDTO.GetParameterValue(); DateTime dt = Converter.GetDateTime(dto.ProcessDate); string date = dt.ToString("dd/MM/yyyy"); txtLoanAppDate.Text = date; A2ZRECCTRLDTO getDTO = (A2ZRECCTRLDTO.ReadLastRecords(6)); lblLastAppNo.Text = Converter.GetString(getDTO.CtrlRecLastNo); LoanPurposeDdl(); Hideinfo(); int lappno = Converter.GetInteger(lblLastAppNo.Text); int LoanAppNo = lappno + 1; lblApplicationNo.Text = Converter.GetString(LoanAppNo); MemberDropdown(); AccTypedropdown(); txtLoanAppDate.Focus(); } }
protected void btnSubmit_Click(object sender, EventArgs e) { if (ddlGroup.SelectedIndex == 0) { ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Select Group Code');", true); return; } if (txtPartyName.Text == string.Empty) { ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Input Party Name');", true); return; } //if (txtMobileNo.Text == string.Empty) //{ // ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Input Party Mobile No.');", true); // return; //} //if (txtPartyEmail.Text == string.Empty) //{ // ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Input Party Email');", true); // return; //} //if (txtPartyAddressL1.Text == string.Empty) //{ // ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Input Address');", true); // return; //} try { Int16 code = Converter.GetSmallInteger(ddlGroup.SelectedValue); A2ZRECCTRLDTO getDTO = (A2ZRECCTRLDTO.GetLastRecords(code)); lblLastLPartyNo.Text = Converter.GetString(getDTO.CtrlRecLastNo); GenerateNewLPartyNo(); GenerateNewAccNo(); UpdateRecords(); //GenerateMAG(); } catch (Exception Ex) { ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Data not inserted');", true); return; } }
//Button BtnReEdit = new Button(); //Button BtnInput = new Button(); protected void Page_Load(object sender, EventArgs e) { try { if (!IsPostBack) { userPermission = Converter.GetInteger(SessionStore.GetValue(Params.SYS_USER_PERMISSION)); //if (userPermission != 10) //{ // string notifyMsg = "?txtOne=" + Converter.GetString(SessionStore.GetValue(Params.SYS_USER_NAME)) + // "&txtTwo=" + "You Don't Have Permission for Input" + // "&txtThree=" + "Contact Your Super User" + "&PreviousMenu=A2ZERPModule.aspx"; // Server.Transfer("Notify.aspx" + notifyMsg); //} //else { A2ZCSPARAMETERDTO dto = A2ZCSPARAMETERDTO.GetParameterValue(); DateTime dt = Converter.GetDateTime(dto.ProcessDate); string date = dt.ToString("dd/MM/yyyy"); txtCuOpenDate.Text = date; ProcDate.Text = date; A2ZRECCTRLDTO getDTO = (A2ZRECCTRLDTO.ReadLastRecords(5)); lblLastSRL.Text = Converter.GetString(getDTO.CtrlRecLastNo); BtnCreUnionSubmit.Visible = true; BtnCreUnionUpdate.Visible = false; DivisionDropdown(); DistrictInFo(); UpzilaInfo(); ThanaInfo(); GLCashCodeDropdown(); txtCreUName.Focus(); gvVerify(); } } } catch (Exception ex) { Page.ClientScript.RegisterStartupScript(this.GetType(), "scriptkey", "<script>alert('System Error.Page_Load Problem');</script>"); //throw ex; } }
protected void btnSubmit_Click(object sender, EventArgs e) { try { if (ddlGroup.SelectedIndex == 0) { ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Select Party Group');", true); return; } if (ddlGroup.SelectedValue == "12") { if (txtPartyName.Text.Length > 5) { ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Tracking Code Should be < 6 Character');", true); return; } string qry = "SELECT Id,PartyCode FROM A2ZPARTYCODE WHERE PartyPurchaseCode = '" + ddlPurchasePartyName.SelectedValue + "' AND PartySalesCode = '" + ddlSalesPartyName.SelectedValue + "'"; DataTable dt = DataAccessLayer.BLL.CommonManager.Instance.GetDataTableByQuery(qry, "A2ZACWMS"); if (dt.Rows.Count > 0) { ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Tracking Code Already Exist.');", true); return; } } int code = Converter.GetInteger(ddlGroup.SelectedValue); A2ZRECCTRLDTO getDTO = (A2ZRECCTRLDTO.GetLastRecords(code)); lblLastLPartyNo.Text = Converter.GetString(getDTO.CtrlRecLastNo); GenerateNewLPartyNo(); UpdateRecords(); } catch (Exception ex) { //throw ex; } }
protected void btnAdd_Click(object sender, EventArgs e) { try { A2ZRECCTRLDTO getDTO = (A2ZRECCTRLDTO.GetLastRecords(7)); lblNewSMSNo.Text = Converter.GetString(getDTO.CtrlRecLastNo); DateTime procdate = DateTime.ParseExact(lblProcDate.Text, "dd/MM/yyyy", System.Globalization.CultureInfo.InvariantCulture); if (CtrlModule.Text == "1") { lblSMSStatus.Text = "1"; } else { lblSMSStatus.Text = "3"; } string sqlQuery; int rowEffiect; int i = 0; //int nCount = 0; //i = 0; //foreach (GridViewRow gv in gvModule.Rows) //{ // Boolean m = ((CheckBox)gvModule.Rows[i].FindControl("chkSelect")).Checked; // if (m) // { // nCount++; // } // i++; //} //if (nCount == 0) //{ // //String csname1 = "PopupScript"; // //Type cstype = GetType(); // //ClientScriptManager cs = Page.ClientScript; // //if (!cs.IsStartupScriptRegistered(cstype, csname1)) // //{ // // String cstext1 = "alert('Please Select any one module');"; // // cs.RegisterStartupScript(cstype, csname1, cstext1, true); // //} // ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Please Select any one Module');", true); // return; //} i = 0; foreach (GridViewRow gv in gvModule.Rows) { Boolean m = ((CheckBox)gvModule.Rows[i].FindControl("chkSelect")).Checked; if (m) { lblFromIdsName.Text = (lblFromIdsName.Text != null) ? lblFromIdsName.Text.Trim().Replace("'", "''") : ""; //gvModule.Rows[i].Cells[2].Text = (gvModule.Rows[i].Cells[2].Text != null) ? gvModule.Rows[i].Cells[2].Text.Trim().Replace("'", "''") : ""; sqlQuery = "INSERT INTO A2ZUSERSMS (SMSNo,SMSDate,SMSFromIdsNo,SMSFromIdsName,SMSToIdsNo,SMSToIdsName,SMSNote,SMSStatus) VALUES ('" + lblNewSMSNo.Text + "','" + procdate + "','" + lblFromIdsNo.Text + "','" + lblFromIdsName.Text + "','" + gvModule.Rows[i].Cells[1].Text + "','" + gvModule.Rows[i].Cells[2].Text.Replace(@" ", "") + "','" + txtsmsMsg.Text + "','" + lblSMSStatus.Text + "')"; rowEffiect = Converter.GetSmallInteger(DataAccessLayer.BLL.CommonManager.Instance.ExecuteNonQuery(sqlQuery, "A2ZHKMCUS")); } i++; } Iniatialized(); txtsmsMsg.Text = string.Empty; //lblsmsMsg.Visible = false; //txtsmsMsg.Visible = false; //DivGridView.Visible = false; //lblsmsMsg.Visible = false; //txtsmsMsg.Visible = false; SentMsg(); } catch (Exception ex) { throw ex; } }
protected void BtnProceed_Click(object sender, EventArgs e) { string sqlquery3 = "Truncate table dbo.A2ZCUNION "; // string sqlquery4 = "Truncate table dbo.A2ZMEMBER "; int result = Converter.GetInteger(DataAccessLayer.BLL.CommonManager.Instance.ExecuteNonQuery(sqlquery3, "A2ZCSMCUS")); // int resultM = Converter.GetInteger(DataAccessLayer.BLL.CommonManager.Instance.ExecuteNonQuery(sqlquery4, "A2ZCSMCUS")); SqlCommand cmd = new SqlCommand("INSERT INTO A2ZCSMCUS.dbo.A2ZCUNION(CuOldCuNo,CuName,CuOpDt,CuFlag,CuType,CuCertNo,CuAddL1,CuAddL2,CuAddL3,CuEmail,CuTel,CuMobile,CuFax,CuDivi,CuDist,CuThana,GLCashCode) SELECT CUNO,CUNAME,CUOPDT,CUMEMFLAG,CUTYPE,CUCERTNO,CUADDL1,CUADDL2,CUADDL3,CUEMAIL,CUTEL,CUMOBILE,CUFAX,CUDIVI,CUDIST,CUTHAN,GLCASHCODE FROM A2ZCCULB.dbo.A2ZCRUNION", con); // SqlCommand cmd1 = new SqlCommand("INSERT INTO A2ZCSMCUS.dbo.A2ZMEMBER(CuType,CuNo,MemName,MemOpenDate) SELECT CUTYPE,CUNO,CUNAME,CUOPDT FROM A2ZCCULB.dbo.A2ZCRUNION", con); con.Open(); int result1 = cmd.ExecuteNonQuery(); // int result2 = cmd1.ExecuteNonQuery(); if (result1 > 0) { Successful(); } string qry = "SELECT Id,CuType,CuNo,CuName,CuOpDt FROM A2ZCUNION "; DataTable dt = DataAccessLayer.BLL.CommonManager.Instance.GetDataTableByQuery(qry, "A2ZCSMCUS"); int totrec = dt.Rows.Count; if (dt.Rows.Count > 0) { foreach (DataRow dr in dt.Rows) { var ParentId = dr["Id"].ToString(); //if (ParentId <= totrec.text) //{ var CType = dr["CuType"].ToString(); var CNo = dr["CuNo"].ToString(); var CName = dr["CuName"].ToString(); var COpDt = dr["CuOpDt"].ToString(); int a = Converter.GetSmallInteger(CType); int b = Converter.GetSmallInteger(CNo); A2ZCUNIONDTO objDTO = new A2ZCUNIONDTO(); objDTO.ID = Converter.GetSmallInteger(ParentId); if (CType == "0") { objDTO.CuType = 1; objDTO.CuTypeName = "Affiliate"; } else if (CType == "1") { objDTO.CuType = 2; objDTO.CuTypeName = "Associate"; } else if (CType == "2") { objDTO.CuType = 3; objDTO.CuTypeName = "Regular"; } objDTO.CuProcFlag = 13; if (COpDt == "") { A2ZCSPARAMETERDTO dto = A2ZCSPARAMETERDTO.GetParameterValue(); string strQuery = "UPDATE A2ZCUNION set CuOpDt='" + dto.ProcessDate + "' where Id='" + objDTO.ID + "' "; int rowEffect = Converter.GetInteger(DataAccessLayer.BLL.CommonManager.Instance.ExecuteNonQuery(strQuery, "A2ZCSMCUS")); if (rowEffect > 0) { DataTable dt1 = DataAccessLayer.BLL.CommonManager.Instance.GetDataTableByQuery("SELECT CuOpDt FROM A2ZCUNION WHERE Id='" + objDTO.ID + "'", "A2ZCSMCUS"); if (dt1.Rows.Count > 0) { var OpDt1 = Converter.GetString(dt1.Rows[0]["CuOpDt"]); objDTO.CuStatusDate = Converter.GetDateTime(OpDt1); objDTO.InputByDate = Converter.GetDateTime(OpDt1); objDTO.VerifyByDate = Converter.GetDateTime(OpDt1); objDTO.ApprovByDate = Converter.GetDateTime(OpDt1); } } } else { objDTO.CuStatusDate = Converter.GetDateTime(COpDt); objDTO.InputByDate = Converter.GetDateTime(COpDt); objDTO.VerifyByDate = Converter.GetDateTime(COpDt); objDTO.ApprovByDate = Converter.GetDateTime(COpDt); } int row = A2ZCUNIONDTO.UpdateInformation1(objDTO); if (row > 0) { } Int16 rcytype = Converter.GetSmallInteger(objDTO.CuType); A2ZRECCTRLDTO RDTO = (A2ZRECCTRLDTO.GetLastRecords(rcytype)); objDTO.CreditUnionNo = Converter.GetSmallInteger(RDTO.CtrlRecLastNo); int row1 = A2ZCUNIONDTO.UpdateInformation1(objDTO); if (row1 > 0) { // A2ZMEMBERDTO MemDTO = new A2ZMEMBERDTO(); // MemDTO.MemberNo = 0; // MemDTO.ID = Converter.GetSmallInteger(objDTO.ID); // MemDTO.CuType = Converter.GetSmallInteger(objDTO.CuType); // MemDTO.CreditUnionNo = Converter.GetInteger(objDTO.CreditUnionNo); // MemDTO.MemberName = Converter.GetString(CName); // int row2 = A2ZMEMBERDTO.Update(MemDTO); } } } GLCashCode(); }
protected void btnUpdate_Click(object sender, EventArgs e) { try { if (ddlOrderParty.SelectedIndex == 0) { ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Please Select Order Party');", true); return; } if (ddlItemName.SelectedIndex == 0) { ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Please Select Item Name');", true); return; } if (ddlKarat.SelectedIndex == 0) { ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Please Select Karat');", true); return; } if (txtPiece.Text == string.Empty || txtPiece.Text == "0") { ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Please Input Piece');", true); return; } if (txtWeight.Text == string.Empty || txtWeight.Text == "0") { ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Please Input Weight Per Piece');", true); return; } if (txtDeliveryPossibleDate.Text == string.Empty) { ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Please Select Delivery Possible Date');", true); return; } if (ImgPicture.ImageUrl != "" && ImgPicture.ImageUrl != null) { Int16 code = Converter.GetSmallInteger(55); A2ZRECCTRLDTO getDTO = (A2ZRECCTRLDTO.GetLastRecords(code)); lblNewOrderNo.Text = "55" + getDTO.CtrlRecLastNo.ToString("000000"); var prm = new object[22]; prm[0] = lblNewOrderNo.Text; //OrderNo; prm[1] = Converter.GetDateToYYYYMMDD(CtrlProcDate.Text); //OrderDate; prm[2] = ddlOrderParty.SelectedValue; //OrderParty; prm[3] = ddlWayToOrder.SelectedValue; //WayToOrder; prm[4] = txtWayToOrderNo.Text; //WayToOrderNo; prm[5] = txtWhoseOrder.Text; //WhoseOrder; prm[6] = Converter.GetDateToYYYYMMDD(txtDeliveryPossibleDate.Text); //DeliveryPossibleDate; prm[7] = "11"; //OrderStatus prm[8] = "New Order"; //OrderStatusDesc; prm[9] = Converter.GetDateToYYYYMMDD(CtrlProcDate.Text); //OrderStatusDate; prm[10] = ddlItemName.SelectedValue; //ItemCode; prm[11] = ddlItemName.SelectedItem.Text; //ItemName; prm[12] = ddlKarat.SelectedValue; //ItemKarat; prm[13] = txtSize.Text; //ItemSize; prm[14] = txtLength.Text; //ItemLength; prm[15] = txtPiece.Text; //ItemPiece; prm[16] = txtWide.Text; //ItemWide; prm[17] = txtColor.Text; //ItemColor; prm[18] = txtWeight.Text; //ItemWeight; prm[19] = txtTotalWeight.Text; //ItemTotalWeight; prm[20] = lblID.Text; prm[21] = txtPhoneNo.Text; int result = Converter.GetInteger(CommonManager.Instance.GetScalarValueBySp("Sp_NewOrder", prm, "A2ZACOMS")); if (result == 0) { UpdatedMSG(); } } } catch (Exception ex) { throw ex; } }
protected void BtnSubmit_Click(object sender, EventArgs e) { try { if (ddlLoanMemNo.SelectedValue != "-Select-" && ddlAccType.SelectedValue != "-Select-") { A2ZSTAFFLOANDTO objDTO = new A2ZSTAFFLOANDTO(); A2ZRECCTRLDTO getDTO = (A2ZRECCTRLDTO.GetLastRecords(6)); objDTO.LoanApplicationNo = Converter.GetInteger(getDTO.CtrlRecLastNo); lblNewAppNo.Text = Converter.GetString(getDTO.CtrlRecLastNo); if (txtLoanAppDate.Text != string.Empty) { DateTime apdate = DateTime.ParseExact(txtLoanAppDate.Text, "dd/MM/yyyy", System.Globalization.CultureInfo.InvariantCulture); objDTO.LoanApplicationDate = apdate; } else { objDTO.LoanApplicationDate = Converter.GetDateTime(System.DateTime.Now.ToShortDateString()); } objDTO.LoanAccountType = Converter.GetSmallInteger(ddlAccType.SelectedValue); objDTO.AccTypeMode = Converter.GetSmallInteger(lblAccTypeMode.Text); objDTO.LoanMemberNo = Converter.GetInteger(ddlLoanMemNo.SelectedValue); objDTO.LoanApplicationAmount = Converter.GetDecimal(txtLoanAppAmount.Text); objDTO.LoanInterestRate = Converter.GetDecimal(txtLoanInterestRate.Text); objDTO.LoanInstallmentAmount = Converter.GetDecimal(txtLoanInstallmentAmount.Text); objDTO.LoanLastInstallmentAmount = Converter.GetDecimal(txtLoanLastInstlAmount.Text); objDTO.LoanNoInstallment = Converter.GetInteger(txtNoInstallment.Text); objDTO.LoanPurpose = Converter.GetSmallInteger(ddlLoanPurpose.SelectedValue); objDTO.LoanCategory = Converter.GetSmallInteger(ddlLoanCategory.SelectedValue); objDTO.LoanSuretyMemberNo = Converter.GetInteger(txtSuretyMemNo.Text); if (txtLoanExpDate.Text != string.Empty) { DateTime Expdate = DateTime.ParseExact(txtLoanExpDate.Text, "dd/MM/yyyy", System.Globalization.CultureInfo.InvariantCulture); objDTO.LoanExpDate = Expdate; } else { objDTO.LoanExpDate = Converter.GetDateTime(System.DateTime.Now.ToShortDateString()); } objDTO.LoanProcFlag = 11; int roweffect = A2ZSTAFFLOANDTO.InsertInformation(objDTO); if (roweffect > 0) { // A2ZRECCTRLDTO getDTO = (A2ZRECCTRLDTO.ReadLastRecords(4)); lblLastAppNo.Text = Converter.GetString(getDTO.CtrlRecLastNo); clearinfo(); DisplayMessage(); } } else { //InvalidInputMSG(); ddlAccType.Focus(); } } catch (Exception ex) { throw ex; } }
protected void BtnApprove_Click(object sender, EventArgs e) { try { A2ZRECCTRLDTO getDTO = (A2ZRECCTRLDTO.GetLastRecords(1)); lblNewSRL.Text = Converter.GetString(getDTO.CtrlRecLastNo); A2ZCUNIONDTO MemDTO = new A2ZCUNIONDTO(); A2ZMEMBERDTO Mem1DTO = new A2ZMEMBERDTO(); A2ZACCOUNTDTO Mem2DTO = new A2ZACCOUNTDTO(); Button b = (Button)sender; GridViewRow r = (GridViewRow)b.NamingContainer; Label CTyNo = (Label)gvCUInfo.Rows[r.RowIndex].Cells[5].FindControl("lblcutype"); Label CrNo = (Label)gvCUInfo.Rows[r.RowIndex].Cells[6].FindControl("lblcno"); int a = Converter.GetSmallInteger(CTyNo.Text); int c = Converter.GetSmallInteger(CrNo.Text); Int16 CuType = Converter.GetSmallInteger(a); int CNo = Converter.GetSmallInteger(c); lblCuType.Text = Converter.GetString(CuType); lblCuNo.Text = Converter.GetString(CNo); A2ZCUAPPLICATIONDTO objDTO = (A2ZCUAPPLICATIONDTO.GetInformation(CuType, CNo)); if (objDTO.CreditUnionNo > 0) { objDTO.CuType = CuType; objDTO.CreditUnionNo = CNo; MemDTO.CuType = Converter.GetSmallInteger(objDTO.CuType); MemDTO.CuTypeName = Converter.GetString(objDTO.CuTypeName); MemDTO.CreditUnionNo = Converter.GetInteger(lblNewSRL.Text); MemDTO.CreditUnionName = Converter.GetString(objDTO.CreditUnionName); MemDTO.opendate = Converter.GetDateTime(objDTO.opendate); MemDTO.MemberFlag = Converter.GetSmallInteger(objDTO.MemberFlag); MemDTO.CertificateNo = Converter.GetInteger(objDTO.CertificateNo); MemDTO.AddressL1 = Converter.GetString(objDTO.AddressL1); MemDTO.AddressL2 = Converter.GetString(objDTO.AddressL2); MemDTO.AddressL3 = Converter.GetString(objDTO.AddressL3); MemDTO.TelephoneNo = Converter.GetString(objDTO.TelephoneNo); MemDTO.MobileNo = Converter.GetString(objDTO.MobileNo); MemDTO.Fax = Converter.GetString(objDTO.Fax); MemDTO.email = Converter.GetString(objDTO.email); MemDTO.Division = Converter.GetInteger(objDTO.Division); MemDTO.District = Converter.GetInteger(objDTO.District); MemDTO.Upzila = Converter.GetInteger(objDTO.Upzila); MemDTO.Thana = Converter.GetInteger(objDTO.Thana); MemDTO.GLCashCode = Converter.GetInteger(objDTO.GLCashCode); MemDTO.CuStatusDate = Converter.GetDateTime(objDTO.CuStatusDate); MemDTO.ValueDate = Converter.GetDateTime(objDTO.ValueDate); MemDTO.CreateDate = Converter.GetDateTime(objDTO.CreateDate); objDTO.CuProcFlag = Converter.GetSmallInteger(13); objDTO.CuProcDesc = "Approved"; objDTO.ApprovBy = Converter.GetSmallInteger(SessionStore.GetValue(Params.SYS_USER_ID)); A2ZCSPARAMETERDTO dto = A2ZCSPARAMETERDTO.GetParameterValue(); objDTO.ApprovByDate = Converter.GetDateTime(dto.ProcessDate); MemDTO.CuProcFlag = Converter.GetSmallInteger(objDTO.CuProcFlag); MemDTO.ApprovBy = Converter.GetSmallInteger(objDTO.ApprovBy); MemDTO.ApprovByDate = Converter.GetDateTime(objDTO.ApprovByDate); MemDTO.InputBy = Converter.GetSmallInteger(objDTO.InputBy); MemDTO.VerifyBy = Converter.GetSmallInteger(objDTO.VerifyBy); MemDTO.InputByDate = Converter.GetDateTime(objDTO.InputByDate); MemDTO.VerifyByDate = Converter.GetDateTime(objDTO.VerifyByDate); objDTO.VerifyBy = Converter.GetSmallInteger(MemDTO.VerifyBy); objDTO.VerifyByDate = Converter.GetDateTime(MemDTO.VerifyByDate); Mem1DTO.CuType = Converter.GetSmallInteger(MemDTO.CuType); Mem1DTO.CreditUnionNo = Converter.GetInteger(MemDTO.CreditUnionNo); Mem1DTO.MemberName = Converter.GetString(MemDTO.CreditUnionName); Mem1DTO.OpenDate = Converter.GetDateTime(MemDTO.opendate); Mem1DTO.MemType = 1; Mem2DTO.CuType = Converter.GetSmallInteger(MemDTO.CuType); Mem2DTO.CuNo = Converter.GetInteger(MemDTO.CreditUnionNo); Mem2DTO.AccType = 99; Mem2DTO.AccNo = 0; Mem2DTO.MemberNo = 0; Mem2DTO.Opendate = Converter.GetDateTime(MemDTO.opendate); Mem2DTO.AccStatus = 1; Mem2DTO.AccAtyClass = 6; int roweffect = A2ZCUAPPLICATIONDTO.UpdateInformation2(objDTO); if (roweffect > 0) { int row = A2ZCUNIONDTO.InsertInformation(MemDTO); int row1 = A2ZMEMBERDTO.Insert(Mem1DTO); InsertMiscRecord(); //int row2 = A2ZACCOUNTDTO.Insert(Mem2DTO); DisplayMessage(); gvVerify(); string CheckQuery = "SELECT CuType,CuTypeName,CuNo,CuName,CuOpDt,CuProcDesc FROM A2ZCUAPPLICATION Where CuProcFlag = '12' OR CuProcFlag = '22' and CuStatus !='99'"; DataTable dt = new DataTable(); dt = CommonManager.Instance.GetDataTableByQuery(CheckQuery, "A2ZCSMCUS"); if (dt.Rows.Count <= 0) { DivGridViewCancle.Visible = false; lblmsg1.Visible = true; lblmsg2.Visible = true; } } } } catch (Exception ex) { Page.ClientScript.RegisterStartupScript(this.GetType(), "scriptkey", "<script>alert('System Error.BtnApprove_Click Problem');</script>"); //throw ex; } }
protected void btnSubmit_Click(object sender, EventArgs e) { if (txtPartyName.Text == string.Empty) { ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Input Party Name');", true); return; } if (txtMobileNo.Text == string.Empty) { ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Input Party Mobile No.');", true); return; } if (txtPartyEmail.Text == string.Empty) { ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Input Party Email');", true); return; } if (txtPartyAddressL1.Text == string.Empty) { ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Input Address');", true); return; } try { A2ZRECCTRLDTO getDTO = (A2ZRECCTRLDTO.GetLastRecords(1)); lblLastLPartyNo.Text = Converter.GetString(getDTO.CtrlRecLastNo); GenerateNewLPartyNo(); A2ZLOANPARTYDTO objDTO = new A2ZLOANPARTYDTO(); objDTO.LPartyCode = Converter.GetInteger(lblNewLPartyNo.Text); objDTO.LPartyName = Converter.GetString(txtPartyName.Text); objDTO.LPartyAddresssLine1 = Converter.GetString(txtPartyAddressL1.Text); objDTO.LPartyAddresssLine2 = Converter.GetString(txtPartyAddressL2.Text); objDTO.LPartyAddresssLine3 = Converter.GetString(txtPartyAddressL3.Text); objDTO.LPartyMobileNo = Converter.GetString(txtMobileNo.Text); objDTO.LPartyEmail = Converter.GetString(txtPartyEmail.Text); int roweffect = A2ZLOANPARTYDTO.InsertInformation(objDTO); if (roweffect > 0) { UpdatedMSG(); ClearRecords(); txtPartyName.Focus(); //Response.Redirect(Request.RawUrl); } } catch (Exception Ex) { ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Data not inserted');", true); return; } }
protected void BtnCreUnionSubmit_Click(object sender, EventArgs e) { try { A2ZCUAPPLICATIONDTO objDTO = new A2ZCUAPPLICATIONDTO(); A2ZMEMBERDTO MemDTO = new A2ZMEMBERDTO(); A2ZRECCTRLDTO getDTO = (A2ZRECCTRLDTO.GetLastRecords(5)); MemDTO.CreditUnionNo = Converter.GetInteger(getDTO.CtrlRecLastNo); objDTO.CreditUnionNo = Converter.GetInteger(getDTO.CtrlRecLastNo); lblNewSRL.Text = Converter.GetString(getDTO.CtrlRecLastNo); lblLastSRL.Text = Converter.GetString(getDTO.CtrlRecLastNo); MemDTO.MemberName = Converter.GetString(txtCreUName.Text); MemDTO.MemType = 1; objDTO.CreditUnionName = Converter.GetString(txtCreUName.Text); //DateTime date = DateTime.ParseExact(txtCuOpenDate.Text, "MM/dd/yyyy", System.Globalization.CultureInfo.InvariantCulture); if (txtCuOpenDate.Text != string.Empty) { DateTime opdate = DateTime.ParseExact(txtCuOpenDate.Text, "dd/MM/yyyy", System.Globalization.CultureInfo.InvariantCulture); objDTO.opendate = opdate; MemDTO.OpenDate = opdate; } else { string CheckNullOpenDate = ""; objDTO.NullOpenDate = CheckNullOpenDate; } //objDTO.opendate = Converter.GetDateTime(System.DateTime.Now.ToLongDateString()); //objDTO.MemberFlag = Converter.GetSmallInteger(ddlCuMemberFlag.SelectedValue); // objDTO.MemberType = Converter.GetSmallInteger(ddlCuMemberType.SelectedValue); objDTO.CuType = 1; objDTO.CuTypeName = Converter.GetString("Affiliate"); objDTO.CuProcFlag = 8; objDTO.CuProcDesc = "Input"; objDTO.InputBy = Converter.GetSmallInteger(SessionStore.GetValue(Params.SYS_USER_ID)); A2ZCSPARAMETERDTO dto = A2ZCSPARAMETERDTO.GetParameterValue(); if (dto.ProcessDate == DateTime.MinValue) { string checkNullStatusDate = ""; objDTO.NullStatusDate = checkNullStatusDate; string checkNullInputByDate = ""; objDTO.NullInputByDate = checkNullInputByDate; string checkNullVerifyDate = ""; objDTO.NullVerifyByDate = checkNullVerifyDate; string checkNullApproveDate = ""; objDTO.NullApprovByDate = checkNullApproveDate; string checkNullValueDate = ""; objDTO.NullValueDate = checkNullValueDate; string checkNullCreateDate = ""; objDTO.NullCreateDate = checkNullCreateDate; } else { objDTO.CuStatusDate = Converter.GetDateTime(dto.ProcessDate); objDTO.InputByDate = Converter.GetDateTime(dto.ProcessDate); objDTO.VerifyByDate = Converter.GetDateTime(dto.ProcessDate); objDTO.ApprovByDate = Converter.GetDateTime(dto.ProcessDate); objDTO.ValueDate = Converter.GetDateTime(dto.ProcessDate); objDTO.CreateDate = Converter.GetDateTime(dto.ProcessDate); } objDTO.CertificateNo = Converter.GetInteger(txtCuCertificateNo.Text); objDTO.AddressL1 = Converter.GetString(txtCuAddressL1.Text); objDTO.AddressL2 = Converter.GetString(txtCuAddressL2.Text); objDTO.AddressL3 = Converter.GetString(txtCuAddressL3.Text); objDTO.TelephoneNo = Converter.GetString(txtCuTelNo.Text); objDTO.MobileNo = Converter.GetString(txtCuMobileNo.Text); objDTO.Fax = Converter.GetString(txtCuFax.Text); objDTO.email = Converter.GetString(txtCuEmail.Text); objDTO.Division = Converter.GetInteger(ddlDivision.SelectedValue); objDTO.District = Converter.GetInteger(ddlDistrict.SelectedValue); objDTO.Upzila = Converter.GetInteger(ddlUpzila.SelectedValue); objDTO.Thana = Converter.GetInteger(ddlThana.SelectedValue); objDTO.GLCashCode = Converter.GetInteger(txtGLCashCode.Text); // int row = A2ZMEMBERDTO.Insert(MemDTO); int roweffect = A2ZCUAPPLICATIONDTO.InsertInformation(objDTO); if (roweffect > 0) { //ddlCuMemberFlag.SelectedValue = "0"; // ddlCuMemberType.SelectedValue = "0"; clearInfo(); txtCreUName.Focus(); DisplayMessage(); gvVerify(); } } catch (Exception ex) { Page.ClientScript.RegisterStartupScript(this.GetType(), "scriptkey", "<script>alert('System Error.BtnCreUnionSubmit_Click Problem');</script>"); //throw ex; } }