Exemplo n.º 1
0
        public ActionResult Category(EntyMotors collection)
        {
            if (collection.cat != null)
            {
                EntyMotors tbl_obj = new EntyMotors();
                tbl_obj.cat = collection.cat;
                string result = db.saveCat(collection);
                ViewBag.Res = result;
                if (result == "Success")
                {
                    ModelState.Clear();
                }
            }
            else if (collection.Job_Cat != null)
            {
                EntyMotors tbl_obj = new EntyMotors();
                tbl_obj.Job_Cat = collection.Job_Cat;
                string res = db.JobCat(collection);
                ViewBag.Result = res;
                if (res == "Success")
                {
                    ModelState.Clear();
                }
            }
            else if (collection.Job_Cat != null)
            {
                EntyMotors tbl_obj = new EntyMotors();
                tbl_obj.Pro_Cat = collection.Pro_Cat;
                string res = db.JobCat(collection);
                ViewBag.Result = res;
                if (res == "Success")
                {
                    ModelState.Clear();
                }
            }


            return(View());
        }
Exemplo n.º 2
0
 public string CommunityCat(EntyMotors obj)
 {
     return(db1.communityInsert(obj.Community_Cat).FirstOrDefault());
 }
Exemplo n.º 3
0
 public string ClassifiedsCat(EntyMotors obj)
 {
     return(db1.classifiedsInsert(obj.Classifieds_Cat).FirstOrDefault());
 }
Exemplo n.º 4
0
 public string ProCat(EntyMotors obj)
 {
     return(db1.PropInsert(obj.Pro_Cat).FirstOrDefault());
 }
Exemplo n.º 5
0
 public string JobCat(EntyMotors obj)
 {
     return(db1.JobInsert(obj.Job_Cat).FirstOrDefault());
 }
Exemplo n.º 6
0
 public string saveCat(EntyMotors obj)
 {
     return(db1.MotorInsert(obj.cat).FirstOrDefault());
 }