예제 #1
0
        public void Update(string ID)
        {
            string referenceno = "";
            string amt = "";
               if(!string.IsNullOrEmpty(Session["ref_no"].ToString()))
               {
               referenceno = Session["ref_no"].ToString();
               }
               if (!string.IsNullOrEmpty(Session["amount"].ToString()))
               {
               amt = Session["amount"].ToString();
               }

            string amount = (Convert.ToDouble(amt) / 100).ToString();
            string transactiondate = DateTime.Now.ToShortDateString();

            Customerdata cus = new Customerdata();
            cus.C_Id =Convert.ToInt16(ID);
            cus.Action = "Update";
            cus.Transactionnumber = referenceno;
            cus.TotalAmount = amount;
            cus.paymentst = "Success";
            cus.Tdate = DateTime.Now.ToShortDateString();
            DataSet ds = cus.custmaster(cus);
        }
예제 #2
0
 public ActionResult Index(String ID,FormCollection col)
 {
     String Ctype = Request["ctype"].ToString();
     String Cname = Request["cname"].ToString();
     String Title = col["title"].ToString();
     String Fname = Request["firstname"].ToString();
     String Lname = Request["lastname"].ToString();
     String cmpname = Request["cmpname"].ToString();
     String add1 = Request["address1"].ToString();
     String add2 = Request["address2"].ToString();
     String city = Request["city"].ToString();
     String pin = Request["postcode"].ToString();
     String country = col["country"].ToString();
     String tele = Request["tele"].ToString();
     String mobile = Request["mobile"].ToString();
     String email = Request["email"].ToString();
     String comments = Request["InputMessage"].ToString();
     String transactionamount = "12345678901";
     String totalamount = Request["totalfee"].ToString();
     Customerdata cus = new Customerdata();
     cus.Cus_id =ID;
     cus.Action = "Insert";
     cus.Title = Title;
     cus.Fname = Fname;
     cus.Lname = Lname;
     cus.cmpname = cmpname;
     cus.add1 = add1;
     cus.add2 = add2;
     cus.city = city;
     cus.postcode = pin;
     cus.country = country;
     cus.tele = tele;
     cus.mobile = mobile;
     cus.mail = email;
     cus.Transactionnumber = transactionamount;
     cus.TotalAmount = totalamount;
     cus.Tdate = DateTime.Now.ToShortDateString();
     DataSet ds = cus.custmaster(cus);
        TempData["Ctype"] = Ctype;
        TempData["Cname"] = Cname;
        TempData["vpc_Amount"] = totalamount;
        Session["email"] = email;
        Session["comments"] = comments;
        Session["C_ID"] = ds.Tables[0].Rows[0].ItemArray[0].ToString();
        Session["location"] = city;
        Session["book_amount"] = totalamount;
        Session["cdetails"] = Title + "," + Fname + "," + Lname + "," + add1 + "," + city + "," + pin + "," + country + "," + mobile;
     //TempData["message"] = "Transaction successfully";
        return RedirectToAction("InitiatePayment", "paymentdetail");
 }