Ejemplo n.º 1
0
 protected void btnApprove_Click(object sender, EventArgs e)
 {
     //RefundApplication RfApplication = new RefundApplication();
     //RfApplication.InsertNewRefundOrders(
     string userName = Thread.CurrentPrincipal.Identity.Name;
     string RefundOrderID=((TextBox)FVRefundApplication.FindControl("txtRefundOrderId")).Text;
     DateTime RefundDate = Convert.ToDateTime(((TextBox) FVRefundApplication.FindControl("txtRefundDate")).Text);
     RefundApplication RfApplication = new RefundApplication();
      Guid RefundApplicationId=(Guid)FVRefundApplication.SelectedValue;
      DataTable dtTotAmount = RfApplication.GetAllRefundApplicationsById(RefundApplicationId);
      string TotAmount = Convert.ToString(dtTotAmount.Rows[0]["TotalValueOfStamps"]);
      decimal cTotAmount = Convert.ToDecimal(TotAmount);
      decimal PenalityAmount = (cTotAmount)*Convert.ToDecimal(0.10);
      decimal RefundAmount = (cTotAmount)*Convert.ToDecimal(0.90);
      RfApplication.UpdateRefundOrderDetails(RefundApplicationId, PenalityAmount, RefundAmount, RefundOrderID, RefundDate, userName, DateTime.Now);
 }