Example #1
0
        public static DataSet GetUserControl(object userid)
        {
            DataSet    userControlByID;
            QueryAgent agent = new QueryAgent();

            try
            {
                userControlByID = UserDesktopStrategyBuilder.GetUserControlByID(userid);
            }
            catch (Exception exception)
            {
                throw exception;
            }
            finally
            {
                agent.Dispose();
            }
            return(userControlByID);
        }
Example #2
0
        public static void DeleUserControl(object userid)
        {
            EntityData data = new EntityData("UserDesktop");

            try
            {
                try
                {
                    UserDesktopStrategyBuilder.DeleteUserDesktop(userid);
                }
                catch (Exception exception)
                {
                    throw exception;
                }
            }
            finally
            {
                data.Dispose();
            }
        }
Example #3
0
        public static void InsertUserControl(object userid, object controlID)
        {
            EntityData entity = new EntityData("UserDesktop");

            try
            {
                try
                {
                    DataRow newRecord = entity.GetNewRecord();
                    newRecord["UserID"]    = userid;
                    newRecord["ControlID"] = controlID;
                    entity.AddNewRecord(newRecord);
                    UserDesktopStrategyBuilder.InsertUserDesktop(entity);
                }
                catch (Exception exception)
                {
                    throw exception;
                }
            }
            finally
            {
                entity.Dispose();
            }
        }