//[HttpPost]
        //public ActionResult AssignSubMenuItem(AssignSubMenuModel model,int id=0)
        //{
        //    con = new SqlConnection(webconnection);
        //    StringBuilder sb = new StringBuilder();

        //    if (id==0)
        //    {
        //        sb.Append("insert into tblAssignSubMenuItem values('"+model.MainItem+",'"+model.SubItem+"')");
        //    }
        //    else if(id!=0)
        //    {
        //        sb.Append("update tblAssignSubMenuItem set subitemid='" + model.MainItem +"' where ID='"+id);
        //    }

        //    cmd = new SqlCommand(sb.ToString(), con);
        //    cmd.CommandType = CommandType.Text;

        //    con.Open();
        //    cmd.ExecuteNonQuery();

        //    con.Close();

        //    return RedirectToAction("Index");

        //    //var Data = user.AssignSubMenu(model);
        //    //TempData["Error"] = Data;

        //    //return RedirectToAction("Index");
        //}
        public ActionResult Delete(int id = 0)
        {
            var data = user.DeleteSubMenu(id);

            TempData["Error"] = data;
            return(RedirectToAction("Index"));
        }