//public static string GetPhoneBookName(Guid guid) //{ // Business.PhoneBook phoneBookController = new Business.PhoneBook(); // return phoneBookController.GetPhoneBookName(guid); //} public static Common.PhoneBook Load(Guid phoneBookGuid) { Business.PhoneBook phoneBookController = new Business.PhoneBook(); Common.PhoneBook phoneBook = new Common.PhoneBook(); phoneBookController.Load(phoneBookGuid, phoneBook); return(phoneBook); }
public static List <TreeNode> GetAllPhoneBookOfUser(Guid userGuid) { Business.PhoneBook phoneBookController = new Business.PhoneBook(); try { List <DataRow> lstGroups = phoneBookController.GetPhoneBookUser(userGuid, Guid.Empty, string.Empty, true).AsEnumerable().ToList(); List <DataRow> lstRoots = lstGroups.Where(row => Helper.GetGuid(row["ParentGuid"]) == Guid.Empty).ToList(); var nodes = new List <TreeNode>(); foreach (DataRow row in lstRoots) { var node = new TreeNode(); node.id = string.Format("'{0}'", row["Guid"]); node.state = "open"; node.text = row["Name"].ToString(); node.attributes = new { count = row["CountPhoneNumbers"].ToString(), type = Helper.GetInt(row["Type"], 1) }; node.children = GenerateTree(lstGroups, Helper.GetGuid(row["Guid"])); nodes.Add(node); } return(nodes); } catch { return(new List <TreeNode>()); } }
public static void GetUserMaximumRecordInfo(Guid userGuid, ref int mobileCount, ref int emailCount) { Business.PhoneBook phoneBookController = new Business.PhoneBook(); DataTable dtInfo = phoneBookController.GetUserMaximumRecordInfo(userGuid); if (dtInfo.Rows.Count > 0) { mobileCount = Helper.GetInt(dtInfo.Rows[0]["MobileCount"]); emailCount = Helper.GetInt(dtInfo.Rows[0]["EmailCount"]); } }
public static bool UnSubscribeService(string mobile, string serviceId, ref bool numberExist) { try { Business.PhoneBook phoneBookController = new Business.PhoneBook(); return(phoneBookController.UnSubscribeService(mobile, serviceId, ref numberExist)); } catch (Exception ex) { throw ex; } }
public static bool EditItemInPhoneBook(Common.PhoneBook phoneBook) { Business.PhoneBook phoneBookController = new Business.PhoneBook(); try { if (!phoneBookController.UpdateName(phoneBook)) { throw new Exception(Language.GetString("ErrorRecord")); } return(true); } catch (Exception ex) { throw ex; } }
public static Guid InsertItemInPhoneBook(Common.PhoneBook phoneBook) { Business.PhoneBook phoneBookController = new Business.PhoneBook(); Business.User userController = new Business.User(); Common.User user = new Common.User(); try { //if (!phoneBookController.CheckingName(phoneBook.Name, phoneBook.UserGuid)) // return Guid.Empty; userController.Load(phoneBook.UserGuid, user); phoneBook.AdminGuid = user.IsAdmin ? phoneBook.UserGuid : user.ParentGuid; phoneBook.CreateDate = DateTime.Now; phoneBook.IsPrivate = false; return(phoneBookController.Insert(phoneBook)); } catch (Exception ex) { throw ex; } }
//public static bool ChangeParent(Guid phoneBookGuid, Guid parentGuid) //{ // Business.PhoneBook phoneBookController = new Business.PhoneBook(); // if (parentGuid == Guid.Empty) // parentGuid = Helper.GetGuid(phoneBookController.GetRoot().Rows[0]["Guid"]); // return phoneBookController.UpdateParent(phoneBookGuid, parentGuid); //} public static int GetCountNumberUser(Guid userGuid) { Business.PhoneBook phoneBookController = new Business.PhoneBook(); return(phoneBookController.GetCountNumberUser(userGuid)); }
public static Guid GetUserVasGroup(int groupId, string serviceId, Guid userGuid) { Business.PhoneBook phoneBookController = new Business.PhoneBook(); return(phoneBookController.GetUserVasGroup(groupId, serviceId, userGuid)); }
public static DataTable GetPhoneBookOfUser(Guid userGuid) { Business.PhoneBook phoneBookController = new Business.PhoneBook(); return(phoneBookController.GetPhoneBookUser(userGuid)); }
public static DataTable GetPhoneBookOfUser(Guid userGuid, Guid parentNodeGuid, string name, bool loadAllPhoneBook = false) { Business.PhoneBook phoneBookController = new Business.PhoneBook(); return(phoneBookController.GetPhoneBookUser(userGuid, parentNodeGuid, name, loadAllPhoneBook)); }
public static bool UpdateGroup(Guid phoneBookGuid, Business.PhoneBookGroupType type, string name) { Business.PhoneBook phoneBookController = new Business.PhoneBook(); return(phoneBookController.UpdateGroup(phoneBookGuid, type, name)); }
public static bool UpdateVasSetting(Common.PhoneBook phoneBook) { Business.PhoneBook phoneBookController = new Business.PhoneBook(); return(phoneBookController.UpdateVasSetting(phoneBook)); }
public static DataTable GetPhoneBookInfo(string phoneBookGuids) { Business.PhoneBook phoneBookController = new Business.PhoneBook(); return(phoneBookController.GetPhoneBookInfo(phoneBookGuids)); }
public static Guid RecipientIsRegisteredToVasGroup(int groupId, string receiver) { Business.PhoneBook phoneBookController = new Business.PhoneBook(); return(phoneBookController.RecipientIsRegisteredToVasGroup(groupId, receiver)); }
public static bool DeleteItemFromPhoneBook(Guid phoneBookGuid) { Business.PhoneBook phoneBookController = new Business.PhoneBook(); return(phoneBookController.Delete(phoneBookGuid)); }
public static DataTable GetAllServices() { Business.PhoneBook phoneBookController = new Business.PhoneBook(); return(phoneBookController.GetAllServices()); }
public static DataTable GetDisabledServices(string mobile) { Business.PhoneBook phoneBookController = new Business.PhoneBook(); return(phoneBookController.GetDisabledServices(mobile)); }