コード例 #1
0
ファイル: SetBidsController.cs プロジェクト: kosiaris/BoCBid
        public ActionResult ReleasePay(int id)
        {
            ApprovePayment.Get(Session["paymentid"].ToString());

            var prod = db.SetBids.Include(b => b.Products).Where(p => p.Id == id).FirstOrDefault();

            prod.Products.StatusId = 3;
            db.SaveChanges();

            return(View("Successpay"));
        }
コード例 #2
0
 public async Task <IHttpActionResult> MakePayment([FromBody] ApproveRequesst payment)
 {
     try
     {
         ApprovePayment client = new ApprovePayment();
         res = await client.ApprovePayments(payment);
     }
     catch (Exception)
     {
         return(StatusCode(HttpStatusCode.BadRequest));
     }
     return(Ok(res));
 }
コード例 #3
0
        public ApprovePayment GetApprovePaymentRecord(int recordID, string UserID)
        {
            try
            {
                string         proc       = string.Empty;
                ApprovePayment dp         = new ApprovePayment();
                SqlParameter[] Parameters = { new SqlParameter("@SNo",    Convert.ToInt32(recordID)),
                                              new SqlParameter("@UserID", Convert.ToInt32(UserID)) };
                if (System.Web.HttpContext.Current.Request.QueryString.ToString().Split('=')[4] == "O")
                {
                    proc = "GetRecordVerifiedPayment_Office";
                }
                else
                {
                    proc = "GetRecordVerifiedPayment";
                }

                SqlDataReader dr = SqlHelper.ExecuteReader(ReadConnectionString.WebConfigConnectionString, CommandType.StoredProcedure, proc, Parameters);
                if (dr.Read())
                {
                    dp.AccountSNo            = Convert.ToInt32(dr["SNo"]);
                    dp.OfficeSNo             = Convert.ToInt32(dr["OfficeSNo"]);
                    dp.Office                = dr["Office"].ToString().ToUpper();
                    dp.Agent                 = dr["Agent"].ToString().ToUpper();
                    dp.Amount                = Convert.ToString(dr["Amount"]);
                    dp.CreditLimit           = Convert.ToString(dr["Credit"]);
                    dp.UpdateTypeText        = dr["UpdateType"].ToString();
                    dp.TransactionType       = dr["Transaction"].ToString();
                    dp.CreatedUser           = dr["CreatedUser"].ToString();
                    dp.UpdatedUser           = dr["UpdatedUser"].ToString();
                    dp.VerifiedBy            = dr["VerifiedBy"].ToString();
                    dp.Airline               = dr["Airline"].ToString();
                    dp.City                  = dr["City"].ToString();
                    dp.AccountNo             = dr["AccountNo"].ToString();
                    dp.ExistingCreditLimit   = Convert.ToString(dr["ExistingCreditLimit"]);
                    dp.BankGaranteeValidFrom = dr["ValidFrom"].ToString();
                    dp.BankGaranteeValidTo   = dr["validTo"].ToString();
                    dp.PaymentDate           = dr["PaymentDate"].ToString();
                    dp.TransectionModeSNo    = dr["Mode"].ToString();
                    dp.Remarks               = dr["Remarks"].ToString();
                    dp.IsVerified            = dr["IsVerified"].ToString();
                    dp.VerifiedRemarks       = dr["VerifiedRemarks"].ToString();
                    dp.BankName              = dr["BankName"].ToString();
                    dp.BranchName            = dr["BranchName"].ToString();
                    dp.ChequeAccountName     = dr["ChequeAccountName"].ToString();
                    dp.BankAccountNo         = dr["BankAccountNo"].ToString();

                    dp.ApprovedRemarks = dr["ApprovedRemarks"].ToString();
                    dp.IsApproved      = dr["IsApproved"].ToString();

                    if (dr["ChequeDate"].ToString() != "")
                    {
                        dp.ChequeDate = Convert.ToDateTime(dr["ChequeDate"].ToString());
                    }
                    if (dr["TransectionDate"].ToString() != "")
                    {
                        dp.ChequeDate = Convert.ToDateTime(dr["TransectionDate"].ToString());
                    }
                    dp.ReferenceNo = dr["ReferenceNo"].ToString();
                    dp.AwbNumber   = dr["AwbNumber"].ToString(); // Add Awb Number by umar on 31-Aug-2018
                    dp.ChequeNo    = dr["ChequeNo"].ToString();
                    dp.RefNo       = dr["RefNo"].ToString();
                }
                dr.Close();
                return(dp);
            }
            catch (Exception ex)//(Exception ex)
            {
                throw ex;
            }
        }