Exemplo n.º 1
0
        /// <summary>
        /// 初始化短信类型
        /// </summary>
        private object InitType()
        {
            var list = new EyouSoft.BLL.SmsStructure.BSmsPhraseType().GetSmsPhraseTypeList(CurrentUserCompanyID);

            if (list != null && list.Count > 0)
            {
                TypeList = Newtonsoft.Json.JsonConvert.SerializeObject(list);
            }
            return(list);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 获得类型列表
        /// </summary>
        /// <returns></returns>
        protected string GetTypeList()
        {
            var    list = new EyouSoft.BLL.SmsStructure.BSmsPhraseType().GetSmsPhraseTypeList(CurrentUserCompanyID);
            string str  = "<option value=\"0\">-请选择-</option>";

            foreach (var item in list)
            {
                str += string.Format("<option value=\"{0}\" {1}>{2}</option>", item.TypeId, Utils.GetInt(Utils.GetQueryStringValue("type")) == item.TypeId ? "selected=\"selected\"" : "", item.TypeName);
            }
            return(str);
        }
Exemplo n.º 3
0
        /// <summary>
        /// 删除类型
        /// </summary>
        private void DelType()
        {
            int TypeValue = Utils.GetInt(Utils.GetFormValue("selType"));
            int Result    = new EyouSoft.BLL.SmsStructure.BSmsPhraseType().DelSmsPhraseType(TypeValue);

            Response.Clear();
            if (Result == 1)
            {
                InitType();
                Response.Write(UtilsCommons.AjaxReturnJson("1", "类型删除成功!", InitType()));
            }
            else
            {
                Response.Write(UtilsCommons.AjaxReturnJson("0", "类型删除失败!"));
            }
            Response.End();
        }
Exemplo n.º 4
0
        /// <summary>
        /// 添加类型
        /// </summary>
        private void AddType()
        {
            string TypeText = Utils.GetFormValue("txtTypeName");
            int    Result   = new EyouSoft.BLL.SmsStructure.BSmsPhraseType().AddSmsPhraseType(new EyouSoft.Model.SmsStructure.MSmsPhraseType()
            {
                CompanyId  = CurrentUserCompanyID,
                IssueTime  = DateTime.Now,
                OperatorId = SiteUserInfo.UserId,
                TypeName   = TypeText
            });

            Response.Clear();
            if (Result == 1)
            {
                InitType();
                Response.Write(UtilsCommons.AjaxReturnJson("1", "类型添加成功!", InitType()));
            }
            else
            {
                Response.Write(UtilsCommons.AjaxReturnJson("0", "类型添加失败!"));
            }
            Response.End();
        }