public bool DeleteShortCutByUser(string shortCutID, string userID) { var ents = from ent in _userShortCutDAL.GetObjects() where ent.SHORTCUTID == shortCutID && ent.OWNERID == userID select ent; if (ents.Count() > 0) { T_PF_USER_SHORTCUT currentItem = ents.FirstOrDefault() as T_PF_USER_SHORTCUT; return(_userShortCutDAL.Delete(currentItem)); } return(false); }
private bool AddUserShortCut(string shortCutID, string userID) { if (ExistsUserShortCut(shortCutID, userID)) { return(true); } T_PF_USER_SHORTCUT model = Utility.CreateCommonProperty().CloneObject <T_PF_USER_SHORTCUT>(new T_PF_USER_SHORTCUT()); model.SHORTCUTID = shortCutID; model.OWNERID = userID; model.USERSHORTCUTID = Guid.NewGuid().ToString(); return(_userShortCutDAL.Add(model)); }
public static T_PF_USER_SHORTCUT CreateT_PF_USER_SHORTCUT(string uSERSHORTCUTID, string oWNERID, string oWNERNAME, string oWNERCOMPANYID, string oWNERDEPARTMENTID, string oWNERPOSTID, string cREATEUSERID, string cREATEUSERNAME, string cREATECOMPANYID, string cREATEDEPARTMENTID, string cREATEPOSTID, global::System.DateTime cREATEDATE) { T_PF_USER_SHORTCUT t_PF_USER_SHORTCUT = new T_PF_USER_SHORTCUT(); t_PF_USER_SHORTCUT.USERSHORTCUTID = uSERSHORTCUTID; t_PF_USER_SHORTCUT.OWNERID = oWNERID; t_PF_USER_SHORTCUT.OWNERNAME = oWNERNAME; t_PF_USER_SHORTCUT.OWNERCOMPANYID = oWNERCOMPANYID; t_PF_USER_SHORTCUT.OWNERDEPARTMENTID = oWNERDEPARTMENTID; t_PF_USER_SHORTCUT.OWNERPOSTID = oWNERPOSTID; t_PF_USER_SHORTCUT.CREATEUSERID = cREATEUSERID; t_PF_USER_SHORTCUT.CREATEUSERNAME = cREATEUSERNAME; t_PF_USER_SHORTCUT.CREATECOMPANYID = cREATECOMPANYID; t_PF_USER_SHORTCUT.CREATEDEPARTMENTID = cREATEDEPARTMENTID; t_PF_USER_SHORTCUT.CREATEPOSTID = cREATEPOSTID; t_PF_USER_SHORTCUT.CREATEDATE = cREATEDATE; return t_PF_USER_SHORTCUT; }
public void AddToT_PF_USER_SHORTCUT(T_PF_USER_SHORTCUT t_PF_USER_SHORTCUT) { base.AddObject("T_PF_USER_SHORTCUT", t_PF_USER_SHORTCUT); }