Ejemplo n.º 1
0
        public ActionResult Approve()
        {
            String UID = Request.Params["UID"].ToString();
            String PID = Request.Params["PID"].ToString();

            Models.Database db  = new Models.Database();
            ApproveData     apd = new ApproveData();

            String[] x = apd.getData(UID, PID);
            db.DatabaseCon("EAloAllInfo");
            db.setData("Insert into InfoTable (Dates,DTB,Cat,City,Region,FixedDetails,UserDetails,Price,UID,PID,Phone,img1,img2,img3,img4,img5) values(" + "'" + "Dates" + "'," + "'" + x[0] + "'," + "'" + x[1] + "'," + "'" + x[2] + "'," + "'" + x[3] + "'," + "'" + x[4] + "'," + "'" + x[5] + "'," + "'" + x[6] + "'," + "'" + x[7] + "'," + "'" + x[8] + "'," + "'" + x[9] + "'," + "'" + x[10] + "'," + "'" + x[11] + "'," + "'" + x[12] + "'," + "'" + x[13] + "'," + "'" + x[14] + "'" + ")");
            //db.DatabaseCon("EAloAllInfo").Close();
            db.DatabaseCon("EAloCity");
            db.setData("Insert into " + Space(x[2]) + " (Dates,DTB,Cat,City,Region,FixedDetails,UserDetails,Price,UID,PID,Phone,img1,img2,img3,img4,img5) values(" + "'" + "Dates" + "'," + "'" + x[0] + "'," + "'" + x[1] + "'," + "'" + x[2] + "'," + "'" + x[3] + "'," + "'" + x[4] + "'," + "'" + x[5] + "'," + "'" + x[6] + "'," + "'" + x[7] + "'," + "'" + x[8] + "'," + "'" + x[9] + "'," + "'" + x[10] + "'," + "'" + x[11] + "'," + "'" + x[12] + "'," + "'" + x[13] + "'," + "'" + x[14] + "'" + ")");
            /// db.DatabaseCon("EAloCity").Close();
            db.DatabaseCon("EAlo" + Space(x[0]));
            db.setData("Insert into " + "Cetagory" + " (Dates,DTB,Cat,City,Region,FixedDetails,UserDetails,Price,UID,PID,Phone,img1,img2,img3,img4,img5) values(" + "'" + "Dates" + "'," + "'" + x[0] + "'," + "'" + x[1] + "'," + "'" + x[2] + "'," + "'" + x[3] + "'," + "'" + x[4] + "'," + "'" + x[5] + "'," + "'" + x[6] + "'," + "'" + x[7] + "'," + "'" + x[8] + "'," + "'" + x[9] + "'," + "'" + x[10] + "'," + "'" + x[11] + "'," + "'" + x[12] + "'," + "'" + x[13] + "'," + "'" + x[14] + "'" + ")");
            // db.DatabaseCon("EAlo" + Space(x[0])).Close();
            db.DatabaseCon("EAlo");
            db.setData("Delete from ApproveTable where UID=" + "'" + UID + "' and PID=" + "'" + PID + "'");
            // db.DatabaseCon("EAlo").Close();



            return(Redirect("~/Admin/Admin?Password=EAlo&Admin=EAlo"));
        }
Ejemplo n.º 2
0
        public ActionResult changeStatus(ApproveData approveData)

        {
            try
            {
                // TODO: Add insert logic here
                int uId   = Convert.ToInt32(Session["UserId"].ToString());
                var query = db.ConcreteMixingDesigns.Where(c => c.Id == approveData.id).FirstOrDefault();
                query.Status      = approveData.Status;
                query.UpdatedBy   = uId;
                query.UpdatedDate = DateTime.Now;
                db.SaveChanges();

                return(RedirectToAction("ApproveOrDeclineMixingDesign", "MixingDesign", new
                {
                    id = 1
                }));
            }
            catch
            {
                return(View("ApproveDetails"));
            }
        }