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); }
public static void DeleUserControl(object userid) { EntityData data = new EntityData("UserDesktop"); try { try { UserDesktopStrategyBuilder.DeleteUserDesktop(userid); } catch (Exception exception) { throw exception; } } finally { data.Dispose(); } }
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(); } }