Exemple #1
0
        protected void grd_PaymentList_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        {
            List <PaymentDTO> lstDto = new List <PaymentDTO>();
            PaymentBusiness   PB     = new PaymentBusiness();

            lstDto = PB.GetAllPayment(date_input_1.Value.ToString(), date_input_2.Value.ToString());
            grd_PaymentList.DataSource = lstDto;
        }
Exemple #2
0
        protected void btn_select_Click(object sender, EventArgs e)
        {
            List <PaymentDTO> lstDto = new List <PaymentDTO>();
            PaymentBusiness   PB     = new PaymentBusiness();

            lstDto             = PB.GetAllPayment(date_input_1.Value.ToString(), date_input_2.Value.ToString());
            grd_Pay.DataSource = lstDto;
            grd_Pay.DataBind();
        }
Exemple #3
0
        protected void btn_select_Click(object sender, EventArgs e)
        {
            List <PaymentDTO> lstDto = new List <PaymentDTO>();
            PaymentBusiness   PB     = new PaymentBusiness();

            lstDto = PB.GetAllPayment(date_input_1.Value.ToString(), date_input_2.Value.ToString());
            grd_PaymentList.DataSource = lstDto;
            grd_PaymentList.DataBind();
            long sum = 0;

            for (int i = 0; i < lstDto.Count; i++)
            {
                if (lstDto[i].AppStatus == "پرداخت موفق")
                {
                    sum += lstDto[i].Amount;
                }
            }
            lblsum.Text = sum.ToString("N0") + " " + "ریال";
        }
Exemple #4
0
        protected void PayGrid_ItemCommand(object sender, GridCommandEventArgs e)
        {
            CommonBusiness cmnb = new CommonBusiness();

            PaymentBusiness PB = new PaymentBusiness();

            if (e.CommandName == "ConfirmPay")
            {
                PaymentDTO payDTO = new PaymentDTO();
                payDTO.OrderId = long.Parse(e.CommandArgument.ToString());
                PB.UpdatePaymentStatus(payDTO);
                cmnb.InsertIntoUserLog(int.Parse(Session[sessionNames.userID_Karbar].ToString()), DateTime.Now.ToShortTimeString(), int.Parse(Session[sessionNames.appID_Karbar].ToString()), 7, "");

                List <PaymentDTO> lstDto = new List <PaymentDTO>();

                lstDto             = PB.GetAllPayment(date_input_1.Value.ToString(), date_input_2.Value.ToString());
                grd_Pay.DataSource = lstDto;
                grd_Pay.DataBind();
            }
        }