예제 #1
0
 public void BindPaymentMethods()
 {
     try
     {
         BAPaymentTypes objBAPaymentTypes = new BAPaymentTypes();
         int            PaymentId         = 0;
         DataSet        ds = objBAPaymentTypes.GetPaymentTypes(PaymentId);
         if (ds.Tables[0].Rows.Count > 0)
         {
             dropPaymentMethod.DataSource     = ds.Tables[0];
             dropPaymentMethod.DataTextField  = "PaymentName";
             dropPaymentMethod.DataValueField = "PaymentId";
             dropPaymentMethod.DataBind();
             dropPaymentMethod.Items.Insert(0, new ListItem("-- Please Select --", "0"));
         }
         else
         {
             dropPaymentMethod.DataSource = null;
             dropPaymentMethod.DataBind();
             dropPaymentMethod.Items.Insert(0, new ListItem("-- Please Select --", "0"));
         }
     }
     catch (Exception ex)
     {
         lblMsg.Text = _BOUtility.ShowMessage("danger", "Danger", ex.Message);
         ExceptionLogging.SendExcepToDB(ex);
     }
 }
예제 #2
0
 private void GetPaymentTypes(int PaymentId)
 {
     try
     {
         objPaymentTypes.PaymentId = PaymentId;
         DataSet ds = objBAPaymentTypes.GetPaymentTypes(PaymentId);
         if (ds.Tables[0].Rows.Count > 0)
         {
             hf_PaymentId.Value        = ds.Tables[0].Rows[0]["PaymentId"].ToString();
             txtKey.Text               = ds.Tables[0].Rows[0]["PaymentCode"].ToString();
             txtKey.Enabled            = false;
             txtDescription.Text       = ds.Tables[0].Rows[0]["PaymentName"].ToString();
             chkdefaultpayment.Checked = Convert.ToBoolean(ds.Tables[0].Rows[0]["IsDefaultPayment"]);
         }
     }
     catch (Exception ex)
     {
         lblMsg.Text = _objBOUtiltiy.ShowMessage("danger", "Danger", ex.Message);
         ExceptionLogging.SendExcepToDB(ex);
     }
 }
예제 #3
0
 private void BindPaymentTypesDetails()
 {
     try
     {
         gvPaymentTypesList.PageSize = int.Parse(ViewState["ps"].ToString());
         int     PaymentId = 0;
         DataSet ds        = new DataSet();
         ds            = objBAPaymentTypes.GetPaymentTypes(PaymentId);
         Session["dt"] = ds.Tables[0];
         if (ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
         {
             gvPaymentTypesList.DataSource = ds.Tables[0];
             string sortDirection = "ASC", sortExpression;
             if (ViewState["so"] != null)
             {
                 sortDirection = ViewState["so"].ToString();
             }
             if (ViewState["se"] != null)
             {
                 sortExpression = ViewState["se"].ToString();
                 ds.Tables[0].DefaultView.Sort = sortExpression + " " + sortDirection;
             }
             gvPaymentTypesList.DataBind();
         }
         else
         {
             gvPaymentTypesList.DataSource = null;
             gvPaymentTypesList.DataBind();
             Label lblEmptyMessage = gvPaymentTypesList.Controls[0].Controls[0].FindControl("lblEmptyMessage") as Label;
             lblEmptyMessage.Text = "Currently there are no records in System";
         }
     }
     catch (Exception ex)
     {
         lblMsg.Text = _objBOUtiltiy.ShowMessage("danger", "Danger", ex.Message);
         ExceptionLogging.SendExcepToDB(ex);
     }
 }