Ejemplo n.º 1
0
        public List <clsJsonMember.JsonMenus> GetChildMenu(Int32 ParentId, Int32 SID, string PrevApp, string LoginId)
        {
            try
            {
                IDataReader dr;
                List <clsJsonMember.JsonMenus> lstMenuItems = new List <clsJsonMember.JsonMenus>();
                Sqldbmanager.Open();
                Sqldbmanager.CreateParameters(4);
                Sqldbmanager.AddParameters(0, "@ParentId", ParentId);
                Sqldbmanager.AddParameters(1, "@SID", SID);
                Sqldbmanager.AddParameters(2, "@PrevApp", PrevApp);
                Sqldbmanager.AddParameters(3, "@LoginId", LoginId);
                dr = Sqldbmanager.ExecuteReader(CommandType.StoredProcedure, "USP_GetMenus");
                while (dr.Read())
                {
                    clsJsonMember.JsonMenus MenuItems = new clsJsonMember.JsonMenus();
                    MenuItems.MenuId         = Convert.ToInt32(dr["id"]);
                    MenuItems.ParentId       = Convert.ToInt32(dr["parentid"]);
                    MenuItems.MenuName       = dr["menu"].ToString();
                    MenuItems.URL            = Convert.ToString(dr["URL"]);
                    MenuItems.ChildMenuCount = Convert.ToInt32(dr["ChildCount"]);
                    lstMenuItems.Add(MenuItems);
                }

                return(lstMenuItems);
            }
            catch (Exception Ex)
            {
                clsCommonClass clsOCmn = new clsCommonClass();
                clsOCmn.LogError("MainMenu", "BindMenu", Ex.Message);
                throw;
            }
        }
Ejemplo n.º 2
0
 public Object RollbackDrUnsavedWork()
 {
     try
     {
         Sqldbmanager.Open();
         Sqldbmanager.CreateParameters(1);
         Sqldbmanager.AddParameters(0, "@SessionId", System.Web.HttpContext.Current.Session["SessionId"]);
         return(Sqldbmanager.ExecuteScalar(CommandType.StoredProcedure, "USP_RollbackDrUnsavedWork"));
     }
     catch (Exception Ex)
     {
         clsCommonClass clsOCmn = new clsCommonClass();
         clsOCmn.LogError("Data Reconciliation", "RollbackDrUnsavedWork()", Ex.Message);
         throw;
     }
     finally
     {
         Sqldbmanager.Close();
     }
 }