public bool ConfirmRequest(int id, bool dummy, int x)
 {
     try
     {
         AdminServices adminServices = new AdminServices();
         adminServices.ConfirmRequest(id);
         return(true);
     }
     catch (Exception ex)
     {
         // todo:log the exception
         return(false);
     }
 }
示例#2
0
        protected void lvServiceRequest_OnItemCommand(object sender, ListViewCommandEventArgs e)
        {
            if (e.CommandName == "Confirm")
            {
                int id = int.Parse(e.CommandArgument.ToString());

                try
                {
                    adminServices.ConfirmRequest(id);
                    RedirectAndNotify(Request.RawUrl, "تم تأكيد لدفع للطلب");
                }
                catch (Exception)
                {
                    RedirectAndNotify(Request.RawUrl, "خطا اثناء عملية التاكيد حاول لاحقا", "", NotificationType.Error);
                    throw;
                }
            }
        }