protected void BtnCreUnionUpdate_Click(object sender, EventArgs e) { A2ZCUNIONDTO UpDTO = new A2ZCUNIONDTO(); A2ZMEMBERDTO MemDTO = new A2ZMEMBERDTO(); MemDTO.CreditUnionNo = Converter.GetInteger(txtCreditUNo.Text); MemDTO.MemberName = Converter.GetString(txtCreUName.Text); MemDTO.MemType = 1; UpDTO.CreditUnionNo = Converter.GetInteger(txtCreditUNo.Text); UpDTO.CreditUnionName = Converter.GetString(txtCreUName.Text); if (txtCuOpenDate.Text != string.Empty) { DateTime opdate = DateTime.ParseExact(txtCuOpenDate.Text, "dd/MM/yyyy", System.Globalization.CultureInfo.InvariantCulture); UpDTO.opendate = opdate; MemDTO.OpenDate = opdate; } else { UpDTO.opendate = Converter.GetDateTime(System.DateTime.Now.ToLongDateString()); } UpDTO.MemberFlag = Converter.GetSmallInteger(ddlCuMemberFlag.SelectedValue); UpDTO.MemberType = Converter.GetSmallInteger(ddlCuMemberType.SelectedValue); UpDTO.CertificateNo = Converter.GetInteger(txtCuCertificateNo.Text); UpDTO.AddressL1 = Converter.GetString(txtCuAddressL1.Text); UpDTO.AddressL2 = Converter.GetString(txtCuAddressL2.Text); UpDTO.AddressL3 = Converter.GetString(txtCuAddressL3.Text); UpDTO.TelephoneNo = Converter.GetString(txtCuTelNo.Text); UpDTO.MobileNo = Converter.GetString(txtCuMobileNo.Text); UpDTO.Fax = Converter.GetString(txtCuFax.Text); UpDTO.email = Converter.GetString(txtCuEmail.Text); UpDTO.Division = Converter.GetInteger(ddlDivision.SelectedValue); UpDTO.District = Converter.GetInteger(ddlDistrict.SelectedValue); UpDTO.Thana = Converter.GetInteger(ddlThana.SelectedValue); int row = A2ZMEMBERDTO.Update(MemDTO); int roweffect = A2ZCUNIONDTO.UpdateInformation(UpDTO); if (roweffect > 0) { CreditUnionDropdown(); clearInfo(); txtCreditUNo.Text = string.Empty; ddlCuMemberFlag.SelectedValue = "0"; ddlCuMemberType.SelectedValue = "0"; ddlCreditUNo.SelectedValue = "-Select-"; BtnCreUnionUpdate.Visible = false; BtnCreUnionSubmit.Visible = true; txtCreditUNo.Focus(); } }
protected void BtnCreUnionUpdate_Click(object sender, EventArgs e) { Int16 CuType = Converter.GetSmallInteger(lblNewCuType.Text); int CNo = Converter.GetSmallInteger(lblNewCuNo.Text); A2ZCUNIONDTO UpDTO = new A2ZCUNIONDTO(); A2ZMEMBERDTO MemDTO = new A2ZMEMBERDTO(); MemDTO.CreditUnionNo = Converter.GetInteger(CNo); MemDTO.MemberName = Converter.GetString(txtCreUName.Text); MemDTO.MemType = Converter.GetSmallInteger(CuType); UpDTO.CuType = Converter.GetSmallInteger(CuType); UpDTO.CreditUnionNo = Converter.GetInteger(CNo); UpDTO.CreditUnionName = Converter.GetString(txtCreUName.Text); UpDTO.CuProcFlag = 13; UpDTO.CuTypeName = Converter.GetString("Affiliate"); UpDTO.InputBy = Converter.GetSmallInteger(SessionStore.GetValue(Params.SYS_USER_ID)); if (txtCuOpenDate.Text != string.Empty) { DateTime opdate = DateTime.ParseExact(txtCuOpenDate.Text, "dd/MM/yyyy", System.Globalization.CultureInfo.InvariantCulture); UpDTO.opendate = opdate; // MemDTO.OpenDate = opdate; } else { UpDTO.opendate = Converter.GetDateTime(System.DateTime.Now.ToLongDateString()); } //UpDTO.MemberFlag = Converter.GetSmallInteger(ddlCuMemberFlag.SelectedValue); UpDTO.CertificateNo = Converter.GetInteger(txtCuCertificateNo.Text); UpDTO.AddressL1 = Converter.GetString(txtCuAddressL1.Text); UpDTO.AddressL2 = Converter.GetString(txtCuAddressL2.Text); UpDTO.AddressL3 = Converter.GetString(txtCuAddressL3.Text); UpDTO.TelephoneNo = Converter.GetString(txtCuTelNo.Text); UpDTO.MobileNo = Converter.GetString(txtCuMobileNo.Text); UpDTO.Fax = Converter.GetString(txtCuFax.Text); UpDTO.email = Converter.GetString(txtCuEmail.Text); UpDTO.Division = Converter.GetInteger(ddlDivision.SelectedValue); UpDTO.District = Converter.GetInteger(ddlDistrict.SelectedValue); UpDTO.Upzila = Converter.GetInteger(ddlUpzila.SelectedValue); UpDTO.Thana = Converter.GetInteger(ddlThana.SelectedValue); A2ZCSPARAMETERDTO dto = A2ZCSPARAMETERDTO.GetParameterValue(); UpDTO.InputByDate = Converter.GetDateTime(dto.ProcessDate); UpDTO.VerifyByDate = Converter.GetDateTime(dto.ProcessDate); UpDTO.ApprovByDate = Converter.GetDateTime(dto.ProcessDate); UpDTO.CuStatusDate = Converter.GetDateTime(dto.ProcessDate); UpDTO.GLCashCode = Converter.GetInteger(txtGLCashCode.Text); // int row = A2ZMEMBERDTO.Update(MemDTO); int roweffect = A2ZCUNIONDTO.UpdateInformation(UpDTO); if (roweffect > 0) { clearInfo(); txtCreditUNo.Text = string.Empty; //ddlCuMemberFlag.SelectedIndex = 0; ddlGLCashCode.SelectedIndex = 0; ddlCreditUNo.SelectedValue = "-Select-"; BtnCreUnionUpdate.Visible = false; ddlDivision.SelectedIndex = 0; ddlDistrict.SelectedIndex = 0; ddlUpzila.SelectedIndex = 0; ddlThana.SelectedIndex = 0; ddlDivision.Enabled = false; ddlDistrict.Enabled = false; ddlUpzila.Enabled = false; ddlThana.Enabled = false; //ddlCuMemberFlag.Enabled = false; ddlGLCashCode.Enabled = false; txtCreditUNo.Focus(); DivisionDropdown(); DistrictInFo(); UpzilaInfo(); ThanaInfo(); } }