protected void btnSaveDebitOrder_Click(object source, EventArgs e) { model = new MembersModel(); model.FullNames = txtName.Text; model.Surname = txtSurname.Text; model.IDNumber = txtIdNumber.Text; model.DateOfBirth = MaxIfEmpty(txtBirthDay.Text); // model.DebitDate = DateTime.Parse(txtDebitDate1.Text); //Convert.ToDateTime(txtDebitDate1.Text); if (ddlDebitDate.SelectedValue == "1") { DateTime date = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1); model.DebitDate = date; } else if (ddlDebitDate.SelectedValue == "15") { DateTime date = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 15); model.DebitDate = date; } else if (ddlDebitDate.SelectedValue == "23") { DateTime date = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 23); model.DebitDate = date; } else if (ddlDebitDate.SelectedValue == "25") { DateTime date = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 25); model.DebitDate = date; } else if (ddlDebitDate.SelectedValue == "26") { DateTime date = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 26); model.DebitDate = date; } else if (ddlDebitDate.SelectedValue == "28") { DateTime date = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 28); model.DebitDate = date; } else { model.DebitDate = DateTime.MaxValue; } //model.DebitDate = Convert.ToDateTime(txtDebitdate.Text); //model.DebitDate = DateTime.Parse(txtDebitDate.Text); // model.AccountHolder = txtAccountholder.Text; //model.Premium = Convert.ToDecimal(txtPremium); model.Bank = ddlBank.SelectedItem.Text; model.Passport = txtPassport.Text; model.BranchCode = txtBranchcode.Text; model.AccountNumber = txtAccountno.Text; model.parlourid = ParlourId; model.AccountType = ddlAccountType.SelectedItem.Text; model.MemeberNumber = txtPolicyNumber.Text; model.PolicyStatus = Convert.ToString("New Business"); model.Premium = Convert.ToDecimal(txtPremium.Text); if (txtIdNumber == null && txtPassport == null) { return; } BindMember(); MembersBAL.SaveOrderMember(model); //string MemberNumber = MembersBAL.SaveOrderMember(model); ShowMessage(ref lblMessage, MessageType.Success, "Client Saved Successfully"); lblMessage.Visible = true; ClearOrderMemberControl(); }
public void SaveOrderMember(MembersModel model) { MembersBAL.SaveOrderMember(model); }