//public static string GetUserSmsFormats(Guid userGuid, bool showCheckBox) //{ // StringBuilder tree = new StringBuilder(); // StringBuilder phonebook = new StringBuilder(); // List<DataRow> lstUserFormat = new List<DataRow>(); // List<string> lstFormat = new List<string>(); // Business.SmsFormat SmsFormatController = new Business.SmsFormat(); // Common.User user = Facade.User.LoadUser(userGuid); // DataTable dataTableFormats = SmsFormatController.GetFormatOfPhoneBook(user.IsAdmin, user.UserGuid); // lstUserFormat = dataTableFormats.AsEnumerable().ToList(); // tree.Append("<div class='myList'><ul class='browser filetree'>"); // foreach (DataRow row in lstUserFormat) // { // phonebook.Clear(); // if (!lstFormat.Contains(row["FormatGuid"].ToString())) // { // lstFormat.Add(row["FormatGuid"].ToString()); // List<DataRow> lstPhoneBooks = lstUserFormat.Where(format => Helper.GetGuid(format["FormatGuid"]) == Helper.GetGuid(row["FormatGuid"])).ToList(); // foreach (DataRow phoneBookRow in lstPhoneBooks) // { // phonebook.Append(string.Format("<li><span class='folder' Type='group' PhoneBookGuid='{0}'>{1}{2}</span></li>", // phoneBookRow["PhoneBookGuid"], // showCheckBox ? "<input onclick='checkBoxControlChecked(this);' type='checkbox'/>" : string.Empty, // phoneBookRow["PhoneBookName"])); // } // tree.Append(string.Format("<li><span class='root folder' Type='format' FormatGuid='{0}'>{1}{2}</span>{3}</li>", // row["FormatGuid"], // showCheckBox ? "<input onclick='checkBoxControlChecked(this);' type='checkbox'/>" : string.Empty, // row["FormatName"], // phonebook.Length > 0 ? "<ul>" + phonebook.ToString() + "</ul>" : "")); // } // } // tree.Append("</ul></div>"); // return tree.ToString(); //} public static Common.SmsFormat LoadFormat(Guid smsFormatGuid) { Business.SmsFormat smsFormatController = new Business.SmsFormat(); Common.SmsFormat smsFormat = new Common.SmsFormat(); smsFormatController.Load(smsFormatGuid, smsFormat); return(smsFormat); }
public static bool InsertFormatForGroups(Common.SmsFormat smsFormat) { Business.SmsFormat smsFormatController = new Business.SmsFormat(); try { if (smsFormatController.InsertFormat(smsFormat) == Guid.Empty) { throw new Exception(Language.GetString("ErrorRecord")); } return(true); } catch { return(false); } }
public static bool Delete(Guid smsFormatGuid) { Business.SmsFormat smsFormatController = new Business.SmsFormat(); return(smsFormatController.Delete(smsFormatGuid)); }
public static DataTable GetFormatOfPhoneBook(Guid phoneBookGuid) { Business.SmsFormat smsFormatController = new Business.SmsFormat(); return(smsFormatController.GetFormatOfPhoneBook(phoneBookGuid)); }
public static DataTable GetUserSmsFormats(Guid userGuid) { Business.SmsFormat SmsFormatController = new Business.SmsFormat(); return(SmsFormatController.GetFormatOfUserPhoneBook(userGuid)); }
public static string GetFormatText(Guid formatGuid) { Business.SmsFormat smsFormatController = new Business.SmsFormat(); return(smsFormatController.GetFormatText(formatGuid)); }
public static DataTable GetFormatSmsInfo(Guid formatGuid) { Business.SmsFormat smsFormatController = new Business.SmsFormat(); return(smsFormatController.GetFormatSmsInfo(formatGuid)); }
public static DataTable GetPagedAllSmsFormats(Guid userGuid, string formatName, string phoneBookName, string sortField, int pageNo, int pageSize, ref int resultCount) { Business.SmsFormat smsFormatController = new Business.SmsFormat(); return(smsFormatController.GetPagedAllSmsFormats(userGuid, formatName, phoneBookName, sortField, pageNo, pageSize, ref resultCount)); }