protected void btnPay_click(object sender, EventArgs e) { OtherPaymentModel model = new OtherPaymentModel(); model.MemberID = Convert.ToInt32(Request.QueryString["Id"]); model.RecievedBy = txtReceivedBy.Text; model.AmountPaid = Convert.ToDecimal(txtAmount.Text); model.MethodOfPayment = ddlMethod.SelectedItem.Value; model.DatePaid = Convert.ToDateTime(txtNextPaymentDate.Text); model.PaymentTypeId = Convert.ToInt32(ddlPaymentType.SelectedItem.Value); model.Notes = txtnotes.Text; model.Parlourid = new Guid(Request.QueryString["ParlourId"]); model.ModifiedUser = this.UserName; int InvoiceID = client.OtherPaymentsSave(model); if (InvoiceID > 0) { ShowMessage(ref lblMessage, MessageType.Success, "Payment added successfully."); bindOtherPayment(Convert.ToInt32(model.MemberID), new Guid(Request.QueryString["ParlourId"])); ClearControl(); } else { ShowMessage(ref lblMessage, MessageType.Warning, "Payment Is Not Add please Try Again."); } }
public static int OthePaymentDetailsSave(OtherPaymentModel model) { try { DbParameter[] ObjParam = new DbParameter[16]; ObjParam[0] = new DbParameter("@pkiInvoiceID", DbParameter.DbType.Int, 0, model.pkiInvoiceID); ObjParam[1] = new DbParameter("@MemberID", DbParameter.DbType.Int, 0, model.MemberID); ObjParam[2] = new DbParameter("@DatePaid", DbParameter.DbType.DateTime, 0, model.DatePaid); ObjParam[3] = new DbParameter("@AmountPaid", DbParameter.DbType.Money, 0, model.AmountPaid); ObjParam[4] = new DbParameter("@RecievedBy", DbParameter.DbType.NVarChar, 0, model.RecievedBy); ObjParam[5] = new DbParameter("@PaidBy", DbParameter.DbType.NVarChar, 0, model.PaidBy); ObjParam[6] = new DbParameter("@Notes", DbParameter.DbType.NVarChar, 0, model.Notes); ObjParam[7] = new DbParameter("@Parlourid", DbParameter.DbType.UniqueIdentifier, 0, model.Parlourid); ObjParam[8] = new DbParameter("@PaymentBranch", DbParameter.DbType.VarChar, 0, model.PaymentBranch); ObjParam[9] = new DbParameter("@LastModified", DbParameter.DbType.DateTime, 0, DateTime.Now); ObjParam[10] = new DbParameter("@ModifiedUser", DbParameter.DbType.VarChar, 0, model.ModifiedUser); ObjParam[11] = new DbParameter("@InvNumber", DbParameter.DbType.Int, 0, model.InvNumber); ObjParam[12] = new DbParameter("@DeviceCollectionID", DbParameter.DbType.UniqueIdentifier, 0, model.DeviceCollectionID); ObjParam[13] = new DbParameter("@MethodOfPayment", DbParameter.DbType.NVarChar, 0, model.MethodOfPayment); ObjParam[14] = new DbParameter("@Discount", DbParameter.DbType.NVarChar, 0, model.Discount); ObjParam[15] = new DbParameter("@PaymentTypeId", DbParameter.DbType.NVarChar, 0, model.PaymentTypeId); return(Convert.ToInt32(DbConnection.GetScalarValue(CommandType.StoredProcedure, "OtherPaymentDetailsSave", ObjParam))); } catch (Exception ex) { throw ex; } }
public void BindEditOtherPayment(int InvoiceID, Guid ParlourId) { if (InvoiceID > 0) { OtherPaymentModel model = client.GetOtherPayment(InvoiceID, ParlourId); InvoiceID = model.pkiInvoiceID; txtNextPaymentDate.Text = Convert.ToString(model.DatePaid); txtAmount.Text = Convert.ToString(model.AmountPaid); ddlMethod.SelectedValue = model.MethodOfPayment; ddlPaymentType.SelectedValue = Convert.ToString(model.PaymentTypeId); txtnotes.Text = model.Notes; ParlourId = model.Parlourid; } }
public void BindOtherInvoiceData() { OtherPaymentModel model = client.GetOtherPayment(OtherInvoiceId, ParlourId); //string[] MonthPaid = getmodel.Notes.Split('-'); tableTitle.Text = ApplicationName; //lblBranchname.Text = Mmodel.MemberBranch.ToString(); //lblreceipt.Text = getmodel.InvNumber.ToString(); lblPolicy.Text = PolicyNum; lblDatePaid.Text = model.DatePaid.ToString("dd-MMM-yyyy"); lblAmtpaid.Text = Currency.Trim() + " " + model.AmountPaid.ToString("F"); lblPolicyholder.Text = string.Empty; lblRecivedBy.Text = model.RecievedBy; lblTimePrint.Text = DateTime.Now.ToString("dd-MMM-yyyy hh:mm"); //lblmethod.Text = getmodel.MethodOfPayment; lblMonthPaid.Text = model.Notes.ToString(); //lblMonthPaid.Text = getmodel.DatePaid.ToString("dd-MMM-yyyy"); lblunderwriter.Text = ""; ltrParlourname.Text = ApplicationName; }
public static int OtherPaymentDetailsSave(OtherPaymentModel model) { return(OtherPaymentDAl.OthePaymentDetailsSave(model)); }
public int OtherPaymentsSave(OtherPaymentModel model) { return(OtherPaymentBAL.OtherPaymentDetailsSave(model)); }