protected void grdFeesPayment_UpdateRow(object sendedr, GridViewUpdateEventArgs e) { try { // Int64 SD_loginId = Convert.ToInt64(grdFeesPayment.DataKeys[e.RowIndex].Value); GridViewRow row = grdFeesPayment.Rows[e.RowIndex] as GridViewRow; Label lblStudentLoginId = row.FindControl("lblStudentLoginId") as Label; Label ldlStudentDivisionId = row.FindControl("ldlStudentDivisionId") as Label; Label ldlStudentStandardId = row.FindControl("ldlStudentStandardId") as Label; Label lblDetailsId = row.FindControl("lblDetailsId") as Label; TextBox txtTotalFees = row.FindControl("txtTotalFees") as TextBox; TextBox txtFeesPaid = row.FindControl("txtFeesPaid") as TextBox; if (lblDetailsId.Text != "0") { TMSFeesAndPaymentDetails objfeesdetails = TMSFeesAndPaymentDetails.Get(Convert.ToInt64(lblDetailsId.Text)); objfeesdetails.SFPStudentLoginId = Convert.ToInt64(lblStudentLoginId.Text); objfeesdetails.SFTPaidFees = Convert.ToDouble(txtFeesPaid.Text); objfeesdetails.SFPTotalFees = Convert.ToDouble(txtTotalFees.Text); objfeesdetails.SFPRemainingFees = Convert.ToDouble(Convert.ToDouble(txtTotalFees.Text) - Convert.ToDouble(txtFeesPaid.Text)); objfeesdetails.Update(); } else { TMSFeesAndPaymentDetails objfees = new TMSFeesAndPaymentDetails(); objfees.SFPStudentLoginId = Convert.ToInt64(lblStudentLoginId.Text); if (ldlStudentStandardId.Text != "") { objfees.SFPStandardId = Convert.ToInt64(ldlStudentStandardId.Text); } if (ldlStudentDivisionId.Text != "") { objfees.SFPDivisionId = Convert.ToInt64(ldlStudentDivisionId.Text); } objfees.SFPTotalFees = Convert.ToDouble(txtTotalFees.Text); objfees.SFTPaidFees = Convert.ToDouble(txtFeesPaid.Text); objfees.SFPAddedById = Convert.ToInt64(Session["UserId"]); objfees.SFPRemainingFees = Convert.ToDouble(Convert.ToDouble(txtTotalFees.Text) - Convert.ToDouble(txtFeesPaid.Text)); objfees.SFPMonth = ddlMonth.SelectedValue; objfees.SFPYear = ddlYear.SelectedValue; objfees.SFPAddedByRemark = "Student Fees"; objfees.SFPTransactionDate = DateTime.Now; objfees.SFPStatus = 1; objfees.Insert(); } grdFeesPayment.EditIndex = -1; BindStudents(); } catch (Exception ex) { } }
public static void Update(TMSFeesAndPaymentDetails tMSFeesAndPaymentDetails, DbTransaction transaction) { tMSFeesAndPaymentDetails.Update(transaction); }
public static void Update(TMSFeesAndPaymentDetails tMSFeesAndPaymentDetails) { tMSFeesAndPaymentDetails.Update(); }
public static void Update(TMSFeesAndPaymentDetails tMSFeesAndPaymentDetails, DbTransaction transaction) { tMSFeesAndPaymentDetails.Update(transaction); }
public static void Update(TMSFeesAndPaymentDetails tMSFeesAndPaymentDetails) { tMSFeesAndPaymentDetails.Update(); }