Пример #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        AdminBll.CheckMulitLogin();
        AdminModel = AdminBll.GetLoginModel();
        AdminUserModel = AdminBll.GetModel(AdminModel.UserId);

        if (!string.IsNullOrEmpty(Request.QueryString["ModelId"]))
        {
            try
            {
                ModelId = int.Parse(Request.QueryString["ModelId"]);
            }
            catch { }
        }

        M_InfoModel infoModel = InfoModelBll.GetModel(ModelId);

        if (!Page.IsPostBack)
        {
            txtTemplatePath.Attributes.Add("readonly", "");

            litNav.Text = "<a href=\"ModelList.aspx\">模型列表<a> >> <a href=\"FieldList.aspx?ModelId=" + ModelId + "\">字段列表</a> >> " + infoModel.ModelName + "预览";

            //绑定自定义字段
            ModelHtml.Text = infoModel.ModelHtml;
            //DataTable dt1 = new DataTable();
            //dt1 = BModelField.GetList(ModelId);
            //Repeater1.DataSource = dt1;
            //Repeater1.DataBind();

            //dt1.Clear();
            //dt1.Dispose();

            FilePicPath.Text = MInfoModel.UploadPath;

            TableName = MInfoModel.TableName;

            //BindSpeacil();
            BindGroup();
        }
    }
Пример #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     power.Power_Judge(5);
     adminModel = admin.GetLoginModel();
     LitMsg.Text = string.Empty;
     if (!IsPostBack)
     {
         if (Request.QueryString["action"] != null && Request.QueryString["key"] != null)
         {
             if (Request.QueryString["action"] == "view")
             {
                 BindCardByAccout(Function.UrlDecode(Request.QueryString["key"].ToString()));
                 mvAddCard.ActiveViewIndex = 2;
             }
         }
         else
         {
             mvAddCard.ActiveViewIndex = 0;
             txtOverdueDate.Text = DateTime.Now.AddMonths(1).ToShortDateString();
             BindCardType(ref ddlCardType);
         }
     }
 }
Пример #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        AdminBll.CheckMulitLogin();
        AdminModel = AdminBll.GetLoginModel();
        AdminUserModel = AdminBll.GetModel(AdminModel.UserId);

        AjaxPro.Utility.RegisterTypeForAjax(typeof(system_info_UpdateInfo));

        if (!string.IsNullOrEmpty(Request.QueryString["ChId"]))
        {
            try
            {
                ChannelId = int.Parse(Request.QueryString["ChId"]);
            }
            catch { }
        }
        ChannelModel = ChannelId <= 0 ? null : ChannelBll.GetChannel(ChannelId);
        MInfoModel = BInfoModel.GetModel(ChannelModel.ModelType);

        Id = int.Parse(Request.QueryString["Id"]);
        if (Id > 0 && !AdminGroupBll.Power_Channel(ChannelId, ColumnId, AdminUserModel.GroupId, 3))
        {
            Function.ShowSysMsg(0, "<li>你没有该栏目下的修改权限</li>");
        }
        drInfo = BInfoOper.GetInfo(MInfoModel.TableName, Id);

        if (!Page.IsPostBack)
        {
            txtTemplatePath.Attributes.Add("readonly", "");

            if (!ColumnBll.ChkHasColumnByChId(ChannelId))
            {
                Function.ShowSysMsg(0, "<li>本频道下没有栏目,不能添加信息!</li><li>建议您先添加栏目</li><li><a href='info/SetColumn.aspx?ChId=" + ChannelId + "'>添加栏目</a> <a href='info/ColumnList.aspx?ChId=" + ChannelId + "'>栏目管理</a></li>");
            }

            if (!string.IsNullOrEmpty(Request.QueryString["ColId"]))
            {
                try
                {
                    ColumnId = int.Parse(Request.QueryString["ColId"]);
                }
                catch { }
            }

            litNav.Text = ChannelModel.TypeName + "管理 &gt;&gt; <a href='InfoList.aspx?ChId=" + ChannelId + "'>站点" + ChannelModel.TypeName + "列表</a> &gt;&gt; 设置" + ChannelModel.TypeName;

            //绑定自定义字段
            ModelHtml.Text = MInfoModel.ModelHtml;

            //DataTable dt1 = new DataTable();
           // dt1 = BModelField.GetList(ChannelModel.ModelType);

            //dt1.Clear();
            //dt1.Dispose();

            FilePicPath.Text = MInfoModel.UploadPath + "|" + MInfoModel.UploadSize.ToString();

            TableName = MInfoModel.TableName;

            BindSpeacil();
            BindGroup();

            //赋值
            GetShow();
        }
    }
Пример #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        AdminBll.CheckMulitLogin();
        AdminModel = AdminBll.GetLoginModel();
        AdminUserModel = AdminBll.GetModel(AdminModel.UserId);

        litMsg.Text = "";
        SiteModel = SiteBll.GetSiteModel();
        InfoSiteModel = SiteBll.GetInfoModel();
        if (SiteModel == null)
        {
            Function.ShowSysMsg(0, "<li>全站参数获取错误</li>");
        }
        txtTemplatePath.Attributes.Add("readonly", "");
        txtUpdateDateTime.Attributes.Add("readonly", "");
        txtHeaderColor.Attributes.Add("readonly", "");
        txtViewer.Attributes.Add("readonly", "");
        HistoryTime = InfoSiteModel.HistoryTime;
        if (!string.IsNullOrEmpty(Request.QueryString["ChId"]))
        {
            try
            {
                ChannelId = int.Parse(Request.QueryString["ChId"]);
            }
            catch { }
        }
        if (!ColumnBll.ChkHasColumnByChId(ChannelId))
        {
            Function.ShowSysMsg(0, "<li>本频道下没有栏目,不能添加信息</li><li>建议您先添加栏目</li><li><a href='info/SetColumn.aspx?ChId=" + ChannelId + "'>添加栏目</a> <a href='info/ColumnList.aspx?ChId=" + ChannelId + "'>栏目管理</a></li>");
        }
        ChannelModel = ChannelId <= 0 ? null : ChannelBll.GetChannel(ChannelId);
        if (ChannelModel == null || ChannelModel.ModelType != 1)
        {
            Function.ShowSysMsg(0, "<li>频道参数错误</li>");
        }
        //保存路径
        InfoModel = InfoModelBll.GetModel(ChannelModel.ModelType);
        FilePicPath.Text = InfoModel.UploadPath + "|" + InfoModel.UploadSize.ToString();
        if (!string.IsNullOrEmpty(Request.QueryString["ColId"]))
        {
            try
            {
                ColumnId = int.Parse(Request.QueryString["ColId"]);
            }
            catch { }
        }
        ColumnModel = ColumnId <= 0 ? null : ColumnBll.GetColumn(ColumnId);
        if (ColumnId > 0 && ColumnModel == null)
        {
            Function.ShowSysMsg(0, "<li>所选栏目不存在或已经被删除</li>");
        }

        if (Request.QueryString["Id"] != null && Request.QueryString["Id"] != "")
        {
            try
            {
                ArticleId = int.Parse(Request.QueryString["Id"]);
            }
            catch { }
        }
        if (ArticleId > 0 && !AdminGroupBll.Power_Channel(ChannelId, ColumnId, AdminUserModel.GroupId, 3))
        {
            Function.ShowSysMsg(0, "<li>你没有该栏目下的修改权限</li>");
        }
        if (!IsPostBack)
        {
            txtUpdateDateTime.Text = DateTime.Now.ToString("yyyy-MM-dd");
            if (HistoryTime == 0)
            {
                txtExpireTime.Text = "9999-01-01";
            }
            else
            {
                txtExpireTime.Text = DateTime.Now.AddDays(HistoryTime).ToString("yyyy-MM-dd");
            }
            for (int i = 0; i <= 20; i++)
            {
                ddlHeaderSize.Items.Add(new ListItem(i + "px", i + "px"));
                ddlHeaderSize.SelectedValue = "12px";
            }
            if (ArticleId > 0)
                litNav.Text = "<a href='ColumnList.aspx?Chid=" + ChannelId + "'>" + ChannelModel.ChName + "</a> &gt;&gt; 修改" + ChannelModel.TypeName;
            else
                litNav.Text = "<a href='ColumnList.aspx?Chid=" + ChannelId + "'>" + ChannelModel.ChName + "</a> &gt;&gt; 添加" + ChannelModel.TypeName;
            BindSpeacil();
            BindGroup();
            if (ArticleId > 0)
            {
                ShowInfo(ArticleId);
            }
        }
    }
Пример #5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        AdminBll.CheckMulitLogin();
        adminModel = admin.GetLoginModel();
        M_InfoModel infoModel = InfoModelBll.GetModel(2);
        FilePicPath.Text = infoModel.UploadPath + "|" + infoModel.UploadSize;
        AdminUserModel = AdminBll.GetModel(adminModel.UserId);
        if (!string.IsNullOrEmpty(Request.QueryString["ChId"]))
        {
            ChannelId = Function.CheckNumberNotZero(Request.QueryString["ChId"]) == true ? int.Parse(Request.QueryString["ChId"]) : 0;
        }
        if (!string.IsNullOrEmpty(Request.QueryString["ColId"]))
        {
            ColId = Function.CheckNumber(Request.QueryString["ColId"]) ? int.Parse(Request.QueryString["ColId"]) : 0;
        }
        ChannelModel = ChannelId <= 0 ? null : ChannelBll.GetChannel(ChannelId);
        if (ChannelModel == null || ChannelModel.ModelType != 2)
        {
            Function.ShowSysMsg(0,"<li>频道参数错误</li><li><a href='javascript:window.history.back();'>返回上一步</a></li>");
            return;
        }
        litNav.Text = ChannelModel.TypeName + "管理 &gt;&gt; <a href='InfoList.aspx?ChId=" + ChannelId + "'>站点" + ChannelModel.TypeName + "列表</a>&gt;&gt;设置" + ChannelModel.TypeName;
        txtTemplatePath.Attributes.Add("readonly", "readonly");

        if (!IsPostBack)
        {
            BindData();
        }

        if (Request.QueryString["ChId"] != null && Request.QueryString["ColId"] != null && Request.QueryString["Id"] != null)
        {
            ColId = Function.CheckNumber(Request.QueryString["ColId"]) == true ? int.Parse(Request.QueryString["ColId"]) : 0;
            ImgId = Function.CheckNumber(Request.QueryString["Id"]) == true ? int.Parse(Request.QueryString["Id"]) : 0;
            if (ImgId > 0 && !AdminGroupBll.Power_Channel(ChannelId, ColId, AdminUserModel.GroupId, 3))
            {
                Function.ShowSysMsg(0, "<li>你没有该栏目下的修改权限</li>");
            }
            model = imageBll.GetItem(ImgId);
            if (ChannelId > 0 && ColId > 0 && ImgId > 0 && model != null)
            {
                flag = "Update";
                if (!IsPostBack)
                {
                    BindDataOnUpdate();
                }
            }
            else
            {
                Function.ShowSysMsg(0,"<li>参数错误</li><li><a href='javascript:window.history.back();'>返回上一步</a></li>");
            }

        }
    }
Пример #6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     AdminBll.CheckMulitLogin();
     AdminModel = AdminBll.GetLoginModel();
     litMsg.Text = "";
     SiteModel = SiteBll.GetSiteModel();
     if(SiteModel==null)
     {
         Function.ShowSysMsg(0, "<li>全站参数获取错误</li>");
     }
     txtSoftTemplatePath.Attributes.Add("readonly", "");
     txtTitleImgPath.Attributes.Add("readonly","");
     if(!string.IsNullOrEmpty(Request.QueryString["ChId"]))
     {
         ChannelId = int.Parse(Request.QueryString["ChId"]);
     }
     if(!ColumnBll.ChkHasColumnByChId(ChannelId))
     {
         Function.ShowSysMsg(0, "<li>本频道下没有栏目,不能添加信息</li><li>建议您先添加栏目</li><li><a href='info/SetColumn.aspx?ChId=" + ChannelId + "'>添加栏目</a> <a href='info/ColumnList.aspx?ChId=" + ChannelId + "'>栏目管理</a></li>");
     }
     ChannelModel = ChannelBll.GetChannel(ChannelId);
     if(ChannelId<=0 || ChannelModel==null || ChannelModel.ModelType!=3)
     {
         Function.ShowSysMsg(0, "<li>频道参数错误</li>");
     }
     if (!string.IsNullOrEmpty(Request.QueryString["ColId"]))
     {
             ColumnId = int.Parse(Request.QueryString["ColId"]);
     }
     if (ColumnId != 0 && ColumnBll.GetColumn(ColumnId) == null)
     {
         Function.ShowSysMsg(0, "<li>所选栏目不存在或已经被删除</li>");
     }
     if (!string.IsNullOrEmpty(Request.QueryString["Id"]))
     {
         try
         {
             Id = int.Parse(Request.QueryString["Id"]);
         }
         catch{}
     }
     B_InfoModel infoModelBll=new B_InfoModel();
     M_InfoModel infoModel = infoModelBll.GetModel(ChannelModel.ModelType);
     FilePicPath.Text = infoModel.UploadPath+"|"+infoModel.UploadSize.ToString();
     if(Id>0)
          litNav.Text = "<a href='ColumnList.aspx?Chid=" + ChannelId + "'>" + ChannelModel.ChName + "</a> &gt;&gt; 修改" + ChannelModel.TypeName;
     else
          litNav.Text = "<a href='ColumnList.aspx?Chid=" + ChannelId + "'>" + ChannelModel.ChName + "</a> &gt;&gt; 添加" + ChannelModel.TypeName;
      if (!IsPostBack)
     {
         BindGroup();
         BindDownServerType();
         BindSpeacil();
         if (Id > 0)
             ShowDownLoadInfo(Id);
         ddlBind();
     }
 }
Пример #7
0
    protected void Page_Load(object sender, EventArgs e)
    {
        AdminBll.CheckMulitLogin();
        AdminModel = AdminBll.GetLoginModel();
        AdminUserModel = AdminBll.GetModel(AdminModel.UserId);

        if (!string.IsNullOrEmpty(Request.QueryString["ChId"]))
        {
            try
            {
                ChannelId = int.Parse(Request.QueryString["ChId"]);
            }
            catch { }
        }

        ChannelModel = ChannelId <= 0 ? null : ChannelBll.GetChannel(ChannelId);
        MInfoModel = BInfoModel.GetModel(ChannelModel.ModelType);

        if (!Page.IsPostBack)
        {
            txtTemplatePath.Attributes.Add("readonly", "");

            if (!ColumnBll.ChkHasColumnByChId(ChannelId))
            {
                Function.ShowSysMsg(0, "<li>本频道下没有栏目,不能添加信息!</li><li>建议您先添加栏目</li><li><a href='info/SetColumn.aspx?ChId=" + ChannelId + "'>添加栏目</a> <a href='info/ColumnList.aspx?ChId=" + ChannelId + "'>栏目管理</a></li>");
            }

            if (!string.IsNullOrEmpty(Request.QueryString["ColId"]))
            {
                try
                {
                    ColumnId = int.Parse(Request.QueryString["ColId"]);
                }
                catch { }
            }

            litNav.Text = ChannelModel.TypeName + "管理 &gt;&gt; <a href='InfoList.aspx?ChId=" + ChannelId + "'>站点" + ChannelModel.TypeName + "列表</a> &gt;&gt; 设置" + ChannelModel.TypeName;

            //绑定自定义字段
            ModelHtml.Text = MInfoModel.ModelHtml;

            FilePicPath.Text = MInfoModel.UploadPath + "|" + MInfoModel.UploadSize.ToString();

            TableName = MInfoModel.TableName;

            BindSpeacil();
            BindGroup();
        }
    }
Пример #8
0
    protected void Page_Load(object sender, EventArgs e)
    {
        AdminBll.CheckMulitLogin();
        LoginAdminModel = AdminBll.GetLoginModel();
        AdminModel = AdminBll.GetModel(LoginAdminModel.UserId);
        litUserName.Text = AdminModel.UserName;
        AdminGroupModel = AdminGroupBll.Show(AdminModel.GroupId);
        litGroupName.Text = AdminGroupModel.PowerName;

        lbNotice.Visible = true;
        lbNotice.Text = "<script language=\"javascript\" src=\"http://info.kycms.com/notice_info.js\"></script>";
        string dateStr = DateTime.Today.ToString("yyyy年MM月dd日");
        int weekNumber = (int)DateTime.Today.DayOfWeek;
        string weekStr = string.Empty;

        switch (weekNumber)
        {
            default:
            case 0: weekStr = "星期日"; break;
            case 1: weekStr = "星期一"; break;
            case 2: weekStr = "星期二"; break;
            case 3: weekStr = "星期三"; break;
            case 4: weekStr = "星期四"; break;
            case 5: weekStr = "星期五"; break;
            case 6: weekStr = "星期六"; break;
        }

        litDate.Text = dateStr + " " + weekStr;
        StringBuilder sb = new StringBuilder();
        sb.Append("共有会员: ");
        sb.Append(UserBll.GetUserCount(0, 0));
        sb.Append("人&nbsp;&nbsp;&nbsp;");

        DataTable userGroupModelDt = UserGroupModelBll.GetAll();
        for (int i = 0; i < userGroupModelDt.Rows.Count; i++)
        {
            DataRow dr = userGroupModelDt.Rows[i];
            int typeId = int.Parse(dr["id"].ToString());
            string name = "[" + dr["name"].ToString() + "]";

            sb.Append(name);
            sb.Append(":");
            int count = UserBll.GetUserCount(typeId, 0);
            sb.Append(count);
            if (i == userGroupModelDt.Rows.Count - 1)
            {
                sb.Append("人&nbsp;&nbsp;&nbsp;");
            }
            else
            {
                sb.Append("人&nbsp;&nbsp;&nbsp;");
            }

        }
        LitCount.Text = sb.ToString();

        //DataTable dt = InfoModelBll.GetList();
        //InfoModelDt = new DataTable();
        //InfoModelDt.Columns.Add("name", typeof(string));
        //InfoModelDt.Columns.Add("total", typeof(string));
        //InfoModelDt.Columns.Add("nocheck", typeof(string));
        //for (int i = 0; i < dt.Rows.Count; i++)
        //{
        //    DataRow dr = dt.Rows[i];
        //    string name = dr["modelname"].ToString();
        //    string tableName = dr["tablename"].ToString();
        //    int totalCount = InfoModelBll.GetModelInfoCount(tableName, "[status] in(0,1,2,3)");
        //    int noCheckCount = InfoModelBll.GetModelInfoCount(tableName,"[status] in(0,1,2)");
        //    DataRow infoModelDr = InfoModelDt.NewRow();
        //    infoModelDr["name"] = name;
        //    infoModelDr["total"] = totalCount;
        //    infoModelDr["nocheck"] = noCheckCount;
        //    InfoModelDt.Rows.Add(infoModelDr);
        //}
        //repCount.DataSource = InfoModelDt.DefaultView;
        //repCount.DataBind();
        //InfoModelDt.Dispose();
    }
Пример #9
0
 public M_LoginAdmin GetLoginModel()
 {
     this.CheckMulitLogin();
     M_LoginAdmin admin = new M_LoginAdmin();
     admin.UserId = int.Parse(HttpContext.Current.Request.Cookies["AdminState"]["UserId"]);
     admin.LoginName = Ky.Common.Function.UrlDecode(HttpContext.Current.Request.Cookies["AdminState"]["LoginName"]);
     admin.Password = Ky.Common.Function.DESDecrypt(HttpContext.Current.Request.Cookies["AdminState"]["Password"]);
     admin.AdminName = Ky.Common.Function.UrlDecode(HttpContext.Current.Request.Cookies["AdminState"]["AdminName"]);
     return admin;
 }