//mainMenu public void insertUpdateMainMenu(string DataTitle, VD_MainMenu mainMenu, ref string outputMsg, ref long outputResult) { SqlCommand command = this.DataManager.CreateCommand(DataTitle, CommandType.StoredProcedure); DataManager.AddParameterWithValue(command, "@MainMenuID", mainMenu.MainMenuID); DataManager.AddParameterWithValue(command, "@MainMenuName", mainMenu.MainMenuName); DataManager.AddParameterWithValue(command, "@IsActive", mainMenu.IsActive); DataManager.AddParameterWithValue(command, "@zIndex", mainMenu.zIndex); SqlParameter paramOutputMsg = new SqlParameter("@outputMsg", SqlDbType.NVarChar, 1000); paramOutputMsg.Direction = ParameterDirection.Output; DataManager.AddParameter(command, paramOutputMsg); SqlParameter paramOutputResult = new SqlParameter("@outputResult", SqlDbType.BigInt); paramOutputResult.Direction = ParameterDirection.Output; DataManager.AddParameter(command, paramOutputResult); DataManager.ExecuteNonQuery(command); if (paramOutputResult.Value != null) { outputResult = (long)paramOutputResult.Value; outputMsg = paramOutputMsg.Value.ToString(); } else { outputResult = -1; outputMsg = string.Empty; } }
public ResultResponse insertUpdateMainMenu(VD_MainMenu _mainMenu) { string _Msg = string.Empty; long _Result = 0; _rr = new ResultResponse(); _DBAccess = new DBController(); _DBAccess.insertUpdateMainMenu("WEB_VD_INSERT_UPDATE_MAINMENU", _mainMenu, ref _Msg, ref _Result); _rr.Msg = _Msg; _rr.Result = _Result; return(_rr); }
public VD_MainMenu getDetailsMainMenu(string ID) { VD_MainMenu info = new VD_MainMenu(); List <VD_SubMenu> lstSub = new List <VD_SubMenu>(); _DBAccess = new DBController(); DataSet ds = new DataSet(); ds = _DBAccess.GetEntityDetails("WEB_VD_GET_DETAILS_MAINMENU", ID); if (ds != null && ds.Tables.Count > 0) { if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0) { info.MainMenuID = Convert.ToString(ds.Tables[0].Rows[0]["MainMenuID"]); info.MainMenuName = Convert.ToString(ds.Tables[0].Rows[0]["MainMenuName"]); info.MetaDescription = Convert.ToString(ds.Tables[0].Rows[0]["MetaDescription"]); info.MetaKeywords = Convert.ToString(ds.Tables[0].Rows[0]["MetaKeywords"]); info.MetaTitle = Convert.ToString(ds.Tables[0].Rows[0]["MetaTitle"]); info.IsActive = Convert.ToBoolean(ds.Tables[0].Rows[0]["IsActive"]); info.zIndex = Convert.ToInt32(ds.Tables[0].Rows[0]["zIndex"]); } if (ds.Tables[1] != null && ds.Tables[1].Rows.Count > 0) { foreach (DataRow row in ds.Tables[1].Rows) { lstSub.Add(new VD_SubMenu { ID = Convert.ToInt64(row["ID"]), MainMenuID = Convert.ToString(row["MainMenuID"]), MainMenuName = Convert.ToString(ds.Tables[0].Rows[0]["MainMenuName"]), SubMenuID = Convert.ToString(row["SubMenuID"]), SubMenuName = Convert.ToString(row["SubMenuName"]), MetaTitleMainMenu = Convert.ToString(row["MetaTitleMainMenu"]), MetaDescription = Convert.ToString(row["MetaDescription"]), MetaKeywords = Convert.ToString(row["MetaKeywords"]), MetaTitle = Convert.ToString(row["MetaTitle"]), IsActive = Convert.ToBoolean(row["IsActive"]), zIndex = Convert.ToInt32(row["zIndex"]) }); } } } info.lstSubMenu = lstSub; return(info); }
public ActionResult InsertUpdateMainmenu(VD_MainMenu mainMenu) { _rr = new ResultResponse(); return(Json(_rr)); }
public void insertUpdateMainMenu(string DataTitle, VD_MainMenu mainMenu, ref string outputMsg, ref long outputResult) { _DB.insertUpdateMainMenu(DataTitle, mainMenu, ref outputMsg, ref outputResult); }