protected void btnFind_Click(object sender, EventArgs e)
    {
        condObj = new WEC_MODEL();

        if(txtID.Value !="" )
            condObj.Like(WEC_MODEL.Attribute.ID, Convert.ToDecimal(txtID.Value));

        if(txtTYPE.Value !="" )
            condObj.TYPE = Convert.ToInt32(txtTYPE.Value);

        if(txtPIC_URL.Value !="" )
            condObj.Like(WEC_MODEL.Attribute.PIC_URL, Convert.ToString(txtPIC_URL.Value));

        if(txtPATH.Value !="" )
            condObj.Like(WEC_MODEL.Attribute.PATH, Convert.ToString(txtPATH.Value));

        if(txtADDTIME.Value !="" )
            condObj.Like(WEC_MODEL.Attribute.ADDTIME, Convert.ToDateTime(txtADDTIME.Value));

        if(txtSTATUS.Value !="" )
            condObj.STATUS = Convert.ToInt32(txtSTATUS.Value);

        if(txtNAME.Value !="" )
            condObj.Like(WEC_MODEL.Attribute.NAME, Convert.ToString(txtNAME.Value));

        hidCondition.Value = condObj.ToJson(20);

        BindList(condObj, 1);
    }
Example #2
0
    private void BindList(WEC_MODEL condObj, int curPage)
    {
        valObj.af_PageBy(WEC_MODEL.Attribute.TYPE, Order.Asc);

        //if (condObj.af_PageByAttributeItem == null)//如果不存在用户定义的分页排序属性,则用主键属性排序
        //    condObj.af_PageBy(WEC_MODEL.Attribute.ID, Order.Desc);

        #region//数据权限条件

        #endregion
        //condObj.PID = decimal.Parse(pid);

        valObj.setConn(conn).setModule(ModuleName);
        List <ITableImplement> valueList;
        List <Relation>        relationList;
        if (valObj.GetModule(out valueList, out relationList) > 0)
        {
            listObj = BLLTable <WEC_MODEL> .Factory(conn).SelectByPage(valObj, relationList, valueList, condObj, aspPager.PageSize, curPage, ref recount);
        }
        else
        {
            listObj = BLLTable <WEC_MODEL> .Factory(conn).SelectByPage(valObj, condObj, aspPager.PageSize, curPage, ref recount);
        }
        repList.DataSource = listObj;
        repList.DataBind();
        aspPager.RecordCount = recount;
    }
Example #3
0
    protected void btnFind_Click(object sender, EventArgs e)
    {
        try
        {
            condObj = new WEC_MODEL();



            if (txtID.Value != "")
            {
                condObj.Like(WEC_MODEL.Attribute.ID, Convert.ToDecimal(txtID.Value));
            }


            if (txtTYPE.Value != "")
            {
                condObj.TYPE = Convert.ToInt32(txtTYPE.Value);
            }


            if (txtPIC_URL.Value != "")
            {
                condObj.Like(WEC_MODEL.Attribute.PIC_URL, Convert.ToString(txtPIC_URL.Value));
            }


            if (txtPATH.Value != "")
            {
                condObj.Like(WEC_MODEL.Attribute.PATH, Convert.ToString(txtPATH.Value));
            }


            if (txtADDTIME.Value != "")
            {
                condObj.Like(WEC_MODEL.Attribute.ADDTIME, Convert.ToDateTime(txtADDTIME.Value));
            }


            if (txtSTATUS.Value != "")
            {
                condObj.STATUS = Convert.ToInt32(txtSTATUS.Value);
            }


            if (txtNAME.Value != "")
            {
                condObj.Like(WEC_MODEL.Attribute.NAME, Convert.ToString(txtNAME.Value));
            }

            listObj = BLLTable <WEC_MODEL> .SelectByPage(valObj, condObj, aspPager.PageSize, 1, ref recount);

            repCus.DataSource = listObj;
            repCus.DataBind();
        }
        catch (Exception ex)
        {
            litWarn.Text = ex.Message;
        }
        aspPager.RecordCount = recount;
    }
 protected void aspPager_PageChanged(object sender, EventArgs e)
 {
     if (hidCondition.Value != "")
     {
         condObj = JsonServiceBase.FromJson<WEC_MODEL>(hidCondition.Value);
     }
     BindList(condObj, aspPager.CurrentPageIndex);
 }
Example #5
0
 protected void aspPager_PageChanged(object sender, EventArgs e)
 {
     if (hidCondition.Value != "")
     {
         condObj = JsonServiceBase.FromJson <WEC_MODEL>(hidCondition.Value);
     }
     BindList(condObj, aspPager.CurrentPageIndex);
 }
Example #6
0
 protected void btnSetPageSize_Click(object sender, EventArgs e)
 {
     aspPager.PageSize = int.Parse(txtPageSize.Value);
     if (hidCondition.Value != "")
     {
         condObj = JsonServiceBase.FromJson <WEC_MODEL>(hidCondition.Value);
     }
     BindList(condObj, aspPager.CurrentPageIndex);
 }
 protected void btnSetPageSize_Click(object sender, EventArgs e)
 {
     aspPager.PageSize = int.Parse(txtPageSize.Value);
     if (hidCondition.Value != "")
     {
         condObj = JsonServiceBase.FromJson<WEC_MODEL>(hidCondition.Value);
     }
     BindList(condObj, aspPager.CurrentPageIndex);
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        title      = valObj._ZhName + "±à¼­";
        Page.Title = title;
        if (!string.IsNullOrEmpty(Request["ID"]))
        {
            keyid = Request["ID"];
        }

        if (!string.IsNullOrEmpty(Request["KeyID"]))
        {
            keyid = Request["KeyID"];
        }
        if (!IsPostBack)
        {
            txtTYPE.Items.AddRange(FormHelper.GetListItem(WEC_MODEL.Attribute.TYPE));
            txtADDTIME.Value = (DateTime.Now).ToString("yyyy-MM-dd");
            txtSTATUS.Items.AddRange(FormHelper.GetListItem(WEC_MODEL.Attribute.STATUS));

            this.txtID.Disabled            = true; this.txtID.Value = "0";
            this.txtID.Attributes["class"] = "dis";
            try
            {
                if (keyid != "")
                {
                    valObj = BLLTable <WEC_MODEL> .GetRowData(WEC_MODEL.Attribute.ID, keyid);

                    if (valObj == null)
                    {
                        return;
                    }

                    txtID.Value = Convert.ToString(valObj.ID);//Convert.ToDecimal

                    txtTYPE.Value = valObj.TYPE.ToString();

                    txtPICURL.Src = valObj.PIC_URL;

                    txtPATH.Value = Convert.ToString(valObj.PATH);//Convert.ToString

                    txtADDTIME.Value = (valObj.ADDTIME == DateTime.MinValue) ? "" : valObj.ADDTIME.ToString("yyyy-MM-dd");

                    txtSTATUS.Value = valObj.STATUS.ToString();

                    txtNAME.Value = Convert.ToString(valObj.NAME);//Convert.ToString
                }
                else
                {
                }
            }
            catch (Exception ex)
            {
                litWarn.Text = ex.Message;
            }
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        //在列表里点击删除按钮,通过AJAX执行这里的后台代码,删除一条记录
        if (Request["DelID"] != null)
        {
            int re = BLLTable <WEC_MODEL> .Delete(WEC_MODEL.Attribute.ID, Request["DelID"]);

            if (re > 0)
            {
                Response.Write("1");//可以输出数字 大于0 表示操作成功,也可以直接输出 字符串,客户端将弹出此字符串信息作为提示
            }
            else
            {
                Response.Write("删除失败!");
            }
        }

        //在列表顶部点击删除按钮,通过AJAX执行这里的后台代码,删除多条记录
        if (Request["DelKeyIDS"] != null)
        {
            WEC_MODEL cond = new WEC_MODEL();
            cond.In(WEC_MODEL.Attribute.ID, Request["DelKeyIDS"]);
            int re = BLLTable <WEC_MODEL> .Delete(cond);

            if (re > 0)
            {
                Response.Write("1");//可以输出数字 大于0 表示操作成功,也可以直接输出 字符串,客户端将弹出此字符串信息作为提示
            }
            else
            {
                Response.Write("删除失败!");
            }
        }

        //在用户详细信息查看编辑页面,点保存时,通过AJAX执行这里的后台代码,实现部门字段的更新
        if (Request["saveInfo"] != null)
        {
            WEC_MODEL val = new WEC_MODEL();
            val.ID = int.Parse(Request["FieldKeyID"]);
            List <AttributeItem> lstCol = val.af_AttributeItemList;
            for (int i = 0; i < lstCol.Count; i++)
            {
                if (!string.IsNullOrEmpty(Request["txt" + lstCol[i].FieldName]))
                {
                    val.SetValue(lstCol[i].FieldName, Request["txt" + lstCol[i].FieldName]);
                }
            }

            BLLTable <WEC_MODEL> .Update(val, WEC_MODEL.Attribute.ID);

            Response.Write("修改用户信息成功");
        }
        Response.End();
    }
Example #10
0
    protected void Page_Load(object sender, EventArgs e)
    {
        #region//默认隐藏的列
        //hideTableColumnList = new List<AttributeItem>();
        //hideTableColumnList.Add(WEC_MODEL.Attribute.EXP1);
        //hideTableColumnList.Add(WEC_MODEL.Attribute.EXP2);
        //hideTableColumnList.Add(WEC_MODEL.Attribute.EXP3);
        //valObj.LoadAllAttributes(true);//暂时加此代码,以后框架更新将不需要
        //valObj.Remove(hideTableColumnList);

        //hideFindColumnList = new List<AttributeItem>();
        //hideFindColumnList.Add(WEC_MODEL.Attribute.EXP1);
        //hideFindColumnList.Add(WEC_MODEL.Attribute.EXP2);
        //hideFindColumnList.Add(WEC_MODEL.Attribute.EXP3);
        #endregion
        condObj.OrderBy(WEC_MODEL.Attribute.ID, Order.Desc);

        if (!IsPostBack)
        {
            btnFind.Text              = LanguageService.GetLanguageString("btnFind", "查询");
            aspPager.PageSize         = 10;
            aspPager.CurrentPageIndex = 1;

            if (!string.IsNullOrEmpty(Request["ids"]))
            {
                WEC_MODEL roleOld = new WEC_MODEL();
                roleOld.Where(WEC_MODEL.Attribute.ID, Request["ids"].ToString());
                listObj = BLLTable <WEC_MODEL> .Select(valObj, roleOld);

                for (int i = 0; i < listObj.Count; i++)
                {
                    if (i > 0)
                    {
                        hidOld.Value     += ",";
                        hidInitIDS.Value += ",";
                    }
                    hidOld.Value     += "{ID:'" + listObj[i].ID + "',Name:'" + listObj[i].ID + "'}";//这里的Name用于显示在列表中,请自行重定义。
                    hidInitIDS.Value += listObj[i].ID;
                }
            }
            try
            {
                listObj = BLLTable <WEC_MODEL> .SelectByPage(valObj, condObj, aspPager.PageSize, 1, ref recount);

                repList.DataSource = listObj;
                repList.DataBind();
                aspPager.RecordCount = recount;
            }
            catch (Exception ex)
            {
                litWarn.Text = ex.Message;
            }
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        title = valObj._ZhName + "��ϸ";
        Page.Title = title;
        if (!IsPostBack)
        {
            try
            {
                if (!string.IsNullOrEmpty(Request["ID"]))
                {

                    valObj = BLLTable<WEC_MODEL>.GetRowData(WEC_MODEL.Attribute.ID, Request["ID"]);
                    if(valObj==null) return ;

                    txtID.Text = Convert.ToString(valObj.ID);//Convert.ToDecimal

                    txtTYPE.Text=valObj.TYPE.ToString();

                    txtPIC_URL.Text = Convert.ToString(valObj.PIC_URL);//Convert.ToString

                    txtPATH.Text = Convert.ToString(valObj.PATH);//Convert.ToString

                    txtADDTIME.Text = (valObj.ADDTIME == DateTime.MinValue) ? "" : valObj.ADDTIME.ToString("yyyy-MM-dd HH:mm");

                    txtSTATUS.Text=valObj.STATUS.ToString();

                    txtNAME.Text = Convert.ToString(valObj.NAME);//Convert.ToString

                }
            }
            catch (Exception ex)
            {
                litWarn.Text = ex.Message;
            }

            if (Request["ajax"] != null)
            {
                Response.Clear();
                Response.Buffer = true;
                Response.Charset = "utf-8";
                Response.ContentEncoding = System.Text.Encoding.GetEncoding("utf-8");//�����������������
                //Response.ContentType = "html/text";

                this.EnableViewState = false;
                System.Globalization.CultureInfo myCItrad = new System.Globalization.CultureInfo("ZH-CN", true);
                System.IO.StringWriter oStringWriter = new System.IO.StringWriter(myCItrad);
                System.Web.UI.HtmlTextWriter oHtmlTextWriter = new System.Web.UI.HtmlTextWriter(oStringWriter);
                divC.RenderControl(oHtmlTextWriter);

                Response.Write(oStringWriter.ToString());
                Response.End();
            }
        }
    }
Example #12
0
    protected void btnFind_Click(object sender, EventArgs e)
    {
        condObj = new WEC_MODEL();



        if (txtID.Value != "")
        {
            condObj.Like(WEC_MODEL.Attribute.ID, Convert.ToDecimal(txtID.Value));
        }


        if (txtTYPE.Value != "")
        {
            condObj.TYPE = Convert.ToInt32(txtTYPE.Value);
        }


        if (txtPIC_URL.Value != "")
        {
            condObj.Like(WEC_MODEL.Attribute.PIC_URL, Convert.ToString(txtPIC_URL.Value));
        }


        if (txtPATH.Value != "")
        {
            condObj.Like(WEC_MODEL.Attribute.PATH, Convert.ToString(txtPATH.Value));
        }


        if (txtADDTIME.Value != "")
        {
            condObj.Like(WEC_MODEL.Attribute.ADDTIME, Convert.ToDateTime(txtADDTIME.Value));
        }


        if (txtSTATUS.Value != "")
        {
            condObj.STATUS = Convert.ToInt32(txtSTATUS.Value);
        }


        if (txtNAME.Value != "")
        {
            condObj.Like(WEC_MODEL.Attribute.NAME, Convert.ToString(txtNAME.Value));
        }

        hidCondition.Value = condObj.ToJson(20);

        BindList(condObj, 1);
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        //���б�����ɾ����ť��ͨ��AJAXִ������ĺ�̨���룬ɾ��һ����¼
        if (Request["DelID"] != null)
        {
            int re = BLLTable<WEC_MODEL>.Delete(WEC_MODEL.Attribute.ID, Request["DelID"]);
            if (re > 0)
            {
                Response.Write("1");//����������� ����0 ��ʾ�����ɹ���Ҳ����ֱ����� �ַ������ͻ��˽��������ַ�����Ϣ��Ϊ��ʾ
            }
            else
            {
                Response.Write("ɾ��ʧ�ܣ�");
            }
        }

        //���б�������ɾ����ť��ͨ��AJAXִ������ĺ�̨���룬ɾ��������¼
        if (Request["DelKeyIDS"] != null)
        {
            WEC_MODEL cond = new WEC_MODEL();
            cond.In(WEC_MODEL.Attribute.ID, Request["DelKeyIDS"]);
            int re = BLLTable<WEC_MODEL>.Delete(cond);
            if (re > 0)
            {
                Response.Write("1");//����������� ����0 ��ʾ�����ɹ���Ҳ����ֱ����� �ַ������ͻ��˽��������ַ�����Ϣ��Ϊ��ʾ
            }
            else
            {
                Response.Write("ɾ��ʧ�ܣ�");
            }
        }

        //���û���ϸ��Ϣ�鿴�༭ҳ�棬�㱣��ʱ��ͨ��AJAXִ������ĺ�̨���룬ʵ�ֲ����ֶεĸ���
        if (Request["saveInfo"] != null)
        {
            WEC_MODEL val = new WEC_MODEL();
            val.ID = int.Parse(Request["FieldKeyID"]);
            List<AttributeItem> lstCol = val.af_AttributeItemList;
            for (int i = 0; i < lstCol.Count; i++)
            {
                if (!string.IsNullOrEmpty(Request["txt" + lstCol[i].FieldName])) {
                    val.SetValue(lstCol[i].FieldName,Request["txt" + lstCol[i].FieldName]);
                }
            }

            BLLTable<WEC_MODEL>.Update(val, WEC_MODEL.Attribute.ID);
            Response.Write("�޸��û���Ϣ�ɹ�");

        }
        Response.End();
    }
 protected void aspPager_PageChanged(object sender, EventArgs e)
 {
     try
     {
         recount = aspPager.RecordCount;
         if (hidCondition.Value != "")
         {
             condObj = JsonServiceBase.FromJson<WEC_MODEL>(hidCondition.Value);
         }
         List<WEC_MODEL> listVal = BLLTable<WEC_MODEL>.SelectByPage(valObj, condObj, aspPager.PageSize, aspPager.CurrentPageIndex, ref recount);
         repList.DataSource = listVal;
         repList.DataBind();
     }
     catch (Exception ex)
     {
          litWarn.Text = ex.Message;
     }
 }
Example #15
0
    protected void aspPager_PageChanged(object sender, EventArgs e)
    {
        try
        {
            if (hidCondition.Value != "")
            {
                condObj = JsonServiceBase.FromJson <WEC_MODEL>(hidCondition.Value);
            }
            listObj = BLLTable <WEC_MODEL> .SelectByPage(valObj, condObj, aspPager.PageSize, aspPager.CurrentPageIndex, ref recount);

            repCus.DataSource = listObj;
            repCus.DataBind();
        }
        catch (Exception ex)
        {
            litWarn.Text = ex.Message;
        }
    }
    protected void btnFind_Click(object sender, EventArgs e)
    {
        condObj = new WEC_MODEL();

        if(txtID.Value !="" )
            condObj.Like_OR(WEC_MODEL.Attribute.ID, Convert.ToDecimal(txtID.Value));

        if(txtTYPE.Value !="" )
            condObj.TYPE = Convert.ToInt32(txtTYPE.Value);

        if(txtPIC_URL.Value !="" )
            condObj.Like_OR(WEC_MODEL.Attribute.PIC_URL, Convert.ToString(txtPIC_URL.Value));

        if(txtPATH.Value !="" )
            condObj.Like_OR(WEC_MODEL.Attribute.PATH, Convert.ToString(txtPATH.Value));

        if(txtADDTIME.Value !="" )
            condObj.Like_OR(WEC_MODEL.Attribute.ADDTIME, Convert.ToDateTime(txtADDTIME.Value));

        if(txtSTATUS.Value !="" )
            condObj.STATUS = Convert.ToInt32(txtSTATUS.Value);

        if(txtNAME.Value !="" )
            condObj.Like_OR(WEC_MODEL.Attribute.NAME, Convert.ToString(txtNAME.Value));

        try
        {
            hidCondition.Value = condObj.ToJson(20);

            listObj = BLLTable<WEC_MODEL>.SelectByPage(valObj, condObj, aspPager.PageSize, 1, ref recount);
            repList.DataSource = listObj;
            repList.DataBind();
        }
        catch (Exception ex)
        {
             litWarn.Text = ex.Message;
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        #region//Ĭ�����ص���
        //hideTableColumnList = new List<AttributeItem>();
        //hideTableColumnList.Add(WEC_MODEL.Attribute.EXP1);
        //hideTableColumnList.Add(WEC_MODEL.Attribute.EXP2);
        //hideTableColumnList.Add(WEC_MODEL.Attribute.EXP3);
        //valObj.LoadAllAttributes(true);//��ʱ�Ӵ˴��룬�Ժ��ܸ��½�����Ҫ
        //valObj.Remove(hideTableColumnList);

        //hideFindColumnList = new List<AttributeItem>();
        //hideFindColumnList.Add(WEC_MODEL.Attribute.EXP1);
        //hideFindColumnList.Add(WEC_MODEL.Attribute.EXP2);
        //hideFindColumnList.Add(WEC_MODEL.Attribute.EXP3);
        #endregion
        condObj.OrderBy(WEC_MODEL.Attribute.ID, Order.Desc);

        if (!IsPostBack)
        {
            btnFind.Text = LanguageService.GetLanguageString("btnFind", "��ѯ");
            aspPager.PageSize = 10;
            aspPager.CurrentPageIndex = 1;

            if (!string.IsNullOrEmpty(Request["ids"]))
            {
                WEC_MODEL roleOld = new WEC_MODEL();
                roleOld.Where(WEC_MODEL.Attribute.ID, Request["ids"].ToString());
                listObj = BLLTable<WEC_MODEL>.Select(valObj, roleOld);
                for (int i = 0; i < listObj.Count; i++)
                {
                    if (i > 0)
                    {
                        hidOld.Value += ",";
                        hidInitIDS.Value += ",";
                    }
                    hidOld.Value += "{ID:'" + listObj[i].ID + "',Name:'" + listObj[i].ID + "'}";//�����Name������ʾ���б��У��������ض��塣
                    hidInitIDS.Value += listObj[i].ID;
                }
            }
            try
            {

                listObj = BLLTable<WEC_MODEL>.SelectByPage(valObj, condObj, aspPager.PageSize, 1, ref recount);
                repList.DataSource = listObj;
                repList.DataBind();
                aspPager.RecordCount = recount;
            }
            catch (Exception ex)
            {
                 litWarn.Text = ex.Message;
            }

        }
    }
Example #18
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            appPath = WebHelper.GetAppPath();
            aid = Convert.ToInt32(userBase2.Curraid);
            string url = Request.Url.ToString();
            string preUrl = WebHelper.GetAppPath();
            // string strsql = "select distinct TYPE from dbo.WEC_MODEL ";
            WEC_MODEL ww = new WEC_MODEL();
            ww.Distinct = true;
            ww.TYPE = 0;
            List<WEC_MODEL> list = BLLTable<WEC_MODEL>.Select(ww);
            string path = "";
            foreach (WEC_MODEL wl in list)
            {
                WEC_MODEL wm = new WEC_MODEL();
                wm.TYPE = wl.TYPE;
                List<WEC_MODEL> listwl = BLLTable<WEC_MODEL>.Select(new WEC_MODEL(), wm);
                path = RemoveNumber(listwl[0].PATH);

                if (listwl.Count != 0)
                {
                    if (!wl.TYPE.Equals(0))
                    {
                        ordervalue = string.Format("{0}<li><a href=\"#{1}\"  data-toggle=\"tab\" >{2}模板风格</a></li>", ordervalue, path, RemoveNumber(listwl[0].NAME));
                        mainvalue.Append("<div class=\"tab-pane fade \" id=\"");
                        mainvalue.Append(path);
                        mainvalue.Append("\"><ul class=\"cateradio \">");
                    }
                    else
                    {
                        ordervalue = string.Format("{0}<li class=\"active\"><a href=\"#{1}\"  data-toggle=\"tab\" >{2}模板风格</a></li>", ordervalue, path, RemoveNumber(listwl[0].NAME));
                        mainvalue.Append("<div class=\"tab-pane fade active in\" id=\"");
                        mainvalue.Append(path);
                        mainvalue.Append("\"><ul class=\"cateradio unstyled\">");
                    }
                    //加载现有模板
                    int selId = banddata(wl.TYPE);
                    foreach (WEC_MODEL wml in listwl)
                    {

                        if (selId == wml.ID)
                        {
                            mainvalue.Append("<li class=\"active\" style=\"margin-left: 70px;\"> <label style=\"text-align: left;\"> <img style=\"margin-left: -70px;\" src=\"");
                            mainvalue.Append(string.Format(@"{0}{1}", preUrl, wml.PIC_URL).Replace ("//","/"));
                            mainvalue.Append("\" alt=\"");
                            mainvalue.Append(wml.NAME);
                            mainvalue.Append("\" title=\"");
                            mainvalue.Append(wml.NAME);
                            mainvalue.Append(string.Format("\"><input type=\"radio\" name=\"{0}\" value=\"{1}\" checked=\"checked\">", path, wml.ID));
                        }
                        else
                        {
                            mainvalue.Append("<li style=\"margin-left: 70px;\"> <label style=\"text-align: left;\"> <img style=\"margin-left: -70px;\" src=\"");
                            mainvalue.Append(string.Format(@"{0}{1}", preUrl, wml.PIC_URL).Replace("//", "/"));
                            mainvalue.Append("\" alt=\"");
                            mainvalue.Append(wml.NAME);
                            mainvalue.Append("\" title=\"");
                            mainvalue.Append(wml.NAME);
                            mainvalue.Append(string.Format("\"><input type=\"radio\" name=\"{0}\" value=\"{1}\">", path, wml.ID));
                        }
                        mainvalue.Append(string.Format("<span style=\"font-weight: bold;\">{0}</span></label></li> ", wml.NAME));
                    }
                    mainvalue.Append("</ul></div>");

                }
            }
        }
        catch (Exception ex)
        {
            throw (ex);
        }
    }
    private void BindList(WEC_MODEL condObj, int curPage)
    {
        valObj.af_PageBy(WEC_MODEL.Attribute.TYPE, Order.Asc);

        //if (condObj.af_PageByAttributeItem == null)//����������û�����ķ�ҳ�������ԣ�����������������
        //    condObj.af_PageBy(WEC_MODEL.Attribute.ID, Order.Desc);

        #region//����Ȩ������

        #endregion
        //condObj.PID = decimal.Parse(pid);

        valObj.setConn(conn).setModule(ModuleName);
        List<ITableImplement> valueList;
        List<Relation> relationList;
        if (valObj.GetModule(out valueList, out relationList) > 0)
            listObj = BLLTable<WEC_MODEL>.Factory(conn).SelectByPage(valObj, relationList, valueList, condObj, aspPager.PageSize, curPage, ref recount);
        else
            listObj = BLLTable<WEC_MODEL>.Factory(conn).SelectByPage(valObj, condObj, aspPager.PageSize, curPage, ref recount);
        repList.DataSource = listObj;
        repList.DataBind();
        aspPager.RecordCount = recount;
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        title = valObj._ZhName + "编辑";
        Page.Title = title;
        if (!string.IsNullOrEmpty(Request["ID"]))
        {
            if (Request["toEdit"] != null)
            {
                keyid = Request["id"];
            }
            else
            {
                //增加
                title = "增设部门";
                pid = Request["id"];

            }
        }

        if (!string.IsNullOrEmpty(Request["KeyID"]))
        {
            keyid = Request["KeyID"];
        }
        if (!IsPostBack)
        {

            txtUP_FLAG.Items.AddRange(FormHelper.GetListItem(WEC_COLUMN.Attribute.UP_FLAG));
            WEC_MODEL cond = new WEC_MODEL();
            cond.TYPE = 2;
            txtMODEL_ID.Items.AddRange(FormHelper.GetListItem(WEC_MODEL.Attribute.ID, WEC_MODEL.Attribute.ID, WEC_MODEL.Attribute.NAME, null, cond));
            txtSTATUS.Items.AddRange(FormHelper.GetListItem(WEC_COLUMN.Attribute.STATUS));
            txtADDTIME.Value = (DateTime.Now).ToString("yyyy-MM-dd");

            this.txtID.Disabled = true; this.txtID.Value = "0";
            this.txtID.Attributes["class"] = "dis";
            this.txtPID.Attributes["class"] = "dis";
            try
            {
                if (keyid != "")
                {
                    valObj = BLLTable<WEC_COLUMN>.GetRowData(WEC_COLUMN.Attribute.ID, keyid);
                    if (valObj == null) return;

                    txtID.Value = Convert.ToString(valObj.ID);//Convert.ToString

                    txtPID.Value = Convert.ToString(valObj.PID);//Convert.ToString

                    txtCOLUMN_NAME.Value = Convert.ToString(valObj.COLUMN_NAME);//Convert.ToString

                    txtCOLUMN_DES.Value = Convert.ToString(valObj.COLUMN_DES);//Convert.ToString

                    txtOUT_URL.Value = Convert.ToString(valObj.OUT_URL);//Convert.ToString

                    txtPICURL.Src = valObj.PIC_URL;

                    txtSMALL_PIC.Src = valObj.SMALL_PIC;

                    txtUP_FLAG.Value = valObj.UP_FLAG.ToString();

                    txtMODEL_ID.Value = Convert.ToString(valObj.MODEL_ID);//Convert.ToDecimal

                    txtSTATUS.Value = valObj.STATUS.ToString();

                    txtADDTIME.Value = (valObj.ADDTIME == DateTime.MinValue) ? "" : valObj.ADDTIME.ToString("yyyy-MM-dd");

                    txtSORT_ID.Value = Convert.ToString(valObj.SORT_ID);//Convert.ToInt32
                }
                else
                {
                    txtID.Value = GetNewDeptID(pid);
                    txtPID.Value = pid;
                }
            }
            catch (Exception ex)
            {
                litWarn.Text = ex.Message;
            }
        }
    }
Example #21
0
    protected void Page_Load(object sender, EventArgs e)
    {
        title      = valObj._ZhName + "±à¼­";
        Page.Title = title;
        if (!string.IsNullOrEmpty(Request["ID"]))
        {
            keyid = Request["ID"];
        }

        if (!string.IsNullOrEmpty(Request["KeyID"]))
        {
            keyid = Request["KeyID"];
        }
        if (Request["deptid"] != null)
        {
            deptid = Request["deptid"];
        }
        if (!IsPostBack)
        {
            WEC_MODEL cond = new WEC_MODEL();
            cond.TYPE = 3;
            txtMODEL_ID.Items.AddRange(FormHelper.GetListItem(WEC_MODEL.Attribute.ID, WEC_MODEL.Attribute.ID, WEC_MODEL.Attribute.NAME, null, cond));
            txtCID.Value                   = "";
            this.txtID.Disabled            = true; this.txtID.Value = "0";
            this.txtID.Attributes["class"] = "dis";
            txtADDTIME.Value               = (DateTime.Now).ToString("yyyy-MM-dd");
            try
            {
                if (keyid != "")
                {
                    valObj = BLLTable <WEC_Article> .GetRowData(WEC_Article.Attribute.ID, keyid);

                    if (valObj == null)
                    {
                        return;
                    }


                    txtID.Value = Convert.ToString(valObj.ID);           //Convert.ToDecimal

                    txtCID.Value = Convert.ToString(valObj.CID);         //Convert.ToString

                    txtAID.Value = Convert.ToString(valObj.AID);         //Convert.ToDecimal

                    txtTITLE.Value = Convert.ToString(valObj.TITLE);     //Convert.ToString

                    txtDES.Value = Convert.ToString(valObj.DES);         //Convert.ToString

                    txtCONTENT.Value = Convert.ToString(valObj.CONTENT); //Convert.ToString

                    txtURL.Value = Convert.ToString(valObj.URL);         //Convert.ToString

                    txtPICURL.Src = valObj.PIC_URL;

                    txtMODEL_ID.Value = Convert.ToString(valObj.MODEL_ID);//Convert.ToDecimal

                    txtADDTIME.Value = (valObj.ADDTIME == DateTime.MinValue) ? "" : valObj.ADDTIME.ToString("yyyy-MM-dd");
                }
                else
                {
                    txtCID.Value = deptid;
                    txtAID.Value = Convert.ToString(userBase2.Curraid);
                }
            }
            catch (Exception ex)
            {
                litWarn.Text = ex.Message;
            }
        }
    }
Example #22
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            appPath = WebHelper.GetAppPath();
            aid     = Convert.ToInt32(userBase2.Curraid);
            string url    = Request.Url.ToString();
            string preUrl = WebHelper.GetAppPath();
            // string strsql = "select distinct TYPE from dbo.WEC_MODEL ";
            WEC_MODEL ww = new WEC_MODEL();
            ww.Distinct = true;
            ww.TYPE     = 0;
            List <WEC_MODEL> list = BLLTable <WEC_MODEL> .Select(ww);

            string path = "";
            foreach (WEC_MODEL wl in list)
            {
                WEC_MODEL wm = new WEC_MODEL();
                wm.TYPE = wl.TYPE;
                List <WEC_MODEL> listwl = BLLTable <WEC_MODEL> .Select(new WEC_MODEL(), wm);

                path = RemoveNumber(listwl[0].PATH);

                if (listwl.Count != 0)
                {
                    if (!wl.TYPE.Equals(0))
                    {
                        ordervalue = string.Format("{0}<li><a href=\"#{1}\"  data-toggle=\"tab\" >{2}模板风格</a></li>", ordervalue, path, RemoveNumber(listwl[0].NAME));
                        mainvalue.Append("<div class=\"tab-pane fade \" id=\"");
                        mainvalue.Append(path);
                        mainvalue.Append("\"><ul class=\"cateradio \">");
                    }
                    else
                    {
                        ordervalue = string.Format("{0}<li class=\"active\"><a href=\"#{1}\"  data-toggle=\"tab\" >{2}模板风格</a></li>", ordervalue, path, RemoveNumber(listwl[0].NAME));
                        mainvalue.Append("<div class=\"tab-pane fade active in\" id=\"");
                        mainvalue.Append(path);
                        mainvalue.Append("\"><ul class=\"cateradio unstyled\">");
                    }
                    //加载现有模板
                    int selId = banddata(wl.TYPE);
                    foreach (WEC_MODEL wml in listwl)
                    {
                        if (selId == wml.ID)
                        {
                            mainvalue.Append("<li class=\"active\" style=\"margin-left: 70px;\"> <label style=\"text-align: left;\"> <img style=\"margin-left: -70px;\" src=\"");
                            mainvalue.Append(string.Format(@"{0}{1}", preUrl, wml.PIC_URL).Replace("//", "/"));
                            mainvalue.Append("\" alt=\"");
                            mainvalue.Append(wml.NAME);
                            mainvalue.Append("\" title=\"");
                            mainvalue.Append(wml.NAME);
                            mainvalue.Append(string.Format("\"><input type=\"radio\" name=\"{0}\" value=\"{1}\" checked=\"checked\">", path, wml.ID));
                        }
                        else
                        {
                            mainvalue.Append("<li style=\"margin-left: 70px;\"> <label style=\"text-align: left;\"> <img style=\"margin-left: -70px;\" src=\"");
                            mainvalue.Append(string.Format(@"{0}{1}", preUrl, wml.PIC_URL).Replace("//", "/"));
                            mainvalue.Append("\" alt=\"");
                            mainvalue.Append(wml.NAME);
                            mainvalue.Append("\" title=\"");
                            mainvalue.Append(wml.NAME);
                            mainvalue.Append(string.Format("\"><input type=\"radio\" name=\"{0}\" value=\"{1}\">", path, wml.ID));
                        }
                        mainvalue.Append(string.Format("<span style=\"font-weight: bold;\">{0}</span></label></li> ", wml.NAME));
                    }
                    mainvalue.Append("</ul></div>");
                }
            }
        }
        catch (Exception ex)
        {
            throw (ex);
        }
    }
    protected void btnOK_Click(object sender, EventArgs e)
    {
        try
        {

            WEC_MODEL valObj = new WEC_MODEL();

            if(txtID.Value !="" )
                valObj.ID = Convert.ToDecimal(txtID.Value);

            if(txtTYPE.Value !="" )
                valObj.TYPE = Convert.ToInt32(txtTYPE.Value);

            valObj.PIC_URL = hidPICURL.Value;

            if(txtPATH.Value !="" )
                valObj.PATH = Convert.ToString(txtPATH.Value);

            if(txtADDTIME.Value !="" )
                valObj.ADDTIME = Convert.ToDateTime(txtADDTIME.Value);

            if(txtSTATUS.Value !="" )
                valObj.STATUS = Convert.ToInt32(txtSTATUS.Value);

            if(txtNAME.Value !="" )
                valObj.NAME = Convert.ToString(txtNAME.Value);

            if (keyid != "")
            {
                valObj.ID = Convert.ToDecimal(keyid);
                count = BLLTable<WEC_MODEL>.Update(valObj, WEC_MODEL.Attribute.ID);
            }
            else
            {
                count = BLLTable<WEC_MODEL>.Insert(valObj, WEC_MODEL.Attribute.ID);
                keyid = valObj.ID.ToString();

            }
            if (count > 0)
            {
                StringBuilder sbData = new StringBuilder("{valObj:''");
                List<AttributeItem> lstCol = valObj.af_AttributeItemList;
                for (int i = 0; i < lstCol.Count; i++)
                {
                    object val = valObj.GetValue(lstCol[i]);
                    if (val != null)
                    {
                        sbData.Append(",").Append(lstCol[i].FieldName).Append(":'").Append(val.ToString()).Append("'");
                    }
                }
                sbData.Append("}");
                if (ViewState["sbData"] == null)
                {
                    ViewState["sbData"] = sbData.ToString();
                }
                else {
                    ViewState["sbData"] += ","+sbData.ToString();
                }
                Button btn = (Button)sender;
                if (btn.ID.IndexOf("btnOK")!=-1)
                {
                    if (ViewState["sbData"] == null)
                    {
                        string dataStr = "[" + ViewState["sbData"].ToString() + "]";
                        ScriptManager.RegisterStartupScript(Page, this.GetType(), "goto", "if (window.opener){window.opener.returnValue = '" + dataStr + "';}else{window.returnValue = '" + dataStr + "';}window.close();", true);
                    }
                    else
                    {
                        ScriptManager.RegisterStartupScript(Page, this.GetType(), "goto", "if (window.opener){window.opener.returnValue = 're';}else{window.returnValue = 're';}window.close();", true);
                    }
                }
                else
                {

                    txtID.Value ="";

                    txtTYPE.Value ="";

                    txtPATH.Value ="";

                    txtADDTIME.Value ="";

                    txtSTATUS.Value ="";

                    txtNAME.Value ="";
                }
            }
        }
        catch (Exception ex)
        {
            litWarn.Text = ex.Message;
        }
    }
Example #24
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string pagename = Page.Request.Url.PathAndQuery;
        preUrl = WebHelper.GetAppPath();
        aid = Common.GetReqIntValue("aid") ;//== 0 ? 1 : Common.GetReqIntValue("aid");
        string id = Common.GetReqStrValue("id");// == "" ? "01" : Common.GetReqStrValue("id");
        string path = "";
        V_WEC_MODEL_SET cond = new V_WEC_MODEL_SET();
        cond.A_ID = aid;
        List<V_WEC_MODEL_SET> list = BLLTable<V_WEC_MODEL_SET>.Select(new V_WEC_MODEL_SET(), cond);

        if (list.Count == 0)
        {
            cond = new V_WEC_MODEL_SET();
            cond.A_ID = -1;
            list = BLLTable<V_WEC_MODEL_SET>.Select(new V_WEC_MODEL_SET(), cond);

        }

        if (list.Count != 0)
        {
            List<V_WEC_MODEL_SET> listhome = new List<V_WEC_MODEL_SET>();
            listhome = list.FindAll(delegate(V_WEC_MODEL_SET c1) { return c1.TYPE == 0; });
            if (listhome.Count == 0) return;
           //配置用户控件(list 和menu 都是模板可配置,先找自己的模板,找不到,套用默认模板)
            if (pagename.ToUpper().Contains("/CHANNEL.ASPX"))
            {
                List<V_WEC_MODEL_SET> listmenu = list.FindAll(delegate(V_WEC_MODEL_SET c1) { return c1.TYPE == 4; });//menu;
                if (listmenu.Count == 0) return;
                path = listmenu[0].PATH;
                PageBase.AddAscx(this, "MenuPanel", path + ".ascx", "Menu", "~/WECWebsite/Menu/" + path + ".ascx", "cphMenu");

                WEC_COLUMN condwn = new WEC_COLUMN();
                condwn.ID = id;
                WEC_COLUMN valwc = BLLTable<WEC_COLUMN>.GetRowData(WEC_COLUMN.Attribute.ID, id);
                if (valwc != null)
                {
                    WEC_MODEL condwl = new WEC_MODEL();
                    condwl.ID = valwc.MODEL_ID;
                    condwl.TYPE = 5;
                    WEC_MODEL valwl = BLLTable<WEC_MODEL>.GetRowData(condwl);

                    if (valwl != null)
                    {
                        path = valwl.PATH;//"List5";//
                        PageBase.AddAscx(this, "BodyPanel", path + ".ascSSx", "Channel", "~/WECWebsite/Channel/" + path + ".ascx", "cphBody");
                    }
                    else
                    {
                        List<V_WEC_MODEL_SET> listlist = list.FindAll(delegate(V_WEC_MODEL_SET c1) { return c1.TYPE == 1; });//list;
                        if (listlist.Count == 0) return;
                        path = listlist[0].PATH;// "List5"; //
                        PageBase.AddAscx(this, "BodyPanel", path + ".ascSSx", "Channel", "~/WECWebsite/Channel/" + path + ".ascx", "cphBody");
                    }

                }
                //path = listhome[0].PATH;//"channel2";//
                //PageBase.AddAscx(this, "BodyPanel", path + ".ascSSx", "Channel", "~/WECWebsite/Channel/" + path + ".ascx", "cphBody");
            }
            else
            {
                if (pagename.ToUpper().Contains("/HOME.ASPX"))
                {
                    path = listhome[0].PATH;// "home6";//
                    PageBase.AddAscx(this, "BodyPanel", path + ".ascx", "Home", "~/WECWebsite/Home/" + path + ".ascx", "cphBody");
                }
                if (pagename.ToUpper().Contains("/LIST.ASPX"))
                {
                    List<V_WEC_MODEL_SET> listmenu = list.FindAll(delegate(V_WEC_MODEL_SET c1) { return c1.TYPE == 4; });//menu;
                    if (listmenu.Count == 0) return;
                    path = listmenu[0].PATH;
                    PageBase.AddAscx(this, "MenuPanel", path + ".ascx", "Menu", "~/WECWebsite/Menu/" + path + ".ascx", "cphMenu");

                    WEC_COLUMN condwn = new WEC_COLUMN();
                    condwn.ID = id;
                    WEC_COLUMN valwc = BLLTable<WEC_COLUMN>.GetRowData(WEC_COLUMN.Attribute.ID, id);
                    if (valwc != null)
                    {
                        WEC_MODEL condwl = new WEC_MODEL();
                        condwl.ID = valwc.MODEL_ID;
                        condwl.TYPE = 2;
                        WEC_MODEL valwl = BLLTable<WEC_MODEL>.GetRowData(condwl);

                        if (valwl != null)
                        {
                            path = valwl.PATH;
                            PageBase.AddAscx(this, "BodyPanel", path + ".ascx", "List", "~/WECWebsite/List/" + path + ".ascx", "cphBody");
                        }
                        else
                        {
                            List<V_WEC_MODEL_SET> listlist = list.FindAll(delegate(V_WEC_MODEL_SET c1) { return c1.TYPE == 2; });//list;
                            if (listlist.Count == 0) return;
                            path = listlist[0].PATH;
                            PageBase.AddAscx(this, "BodyPanel", path + ".ascx", "List", "~/WECWebsite/List/" + path + ".ascx", "cphBody");
                        }

                    }

                }
                else if (pagename.ToUpper().Contains("/DETAIL.ASPX"))
                {
                    List<V_WEC_MODEL_SET> listmenu = list.FindAll(delegate(V_WEC_MODEL_SET c1) { return c1.TYPE == 4; });//menu;
                    if (listmenu.Count == 0) return;
                    path = listmenu[0].PATH;
                    PageBase.AddAscx(this, "MenuPanel", path + ".ascx", "Menu", "~/WECWebsite/Menu/" + path + ".ascx", "cphMenu");

                    WEC_Article condwn = new WEC_Article();
                    condwn.ID =Convert.ToDecimal(id);
                    WEC_Article valwc = BLLTable<WEC_Article>.GetRowData(condwn);
                    if (valwc != null)
                    {
                        WEC_MODEL condwl = new WEC_MODEL();
                        condwl.ID = valwc.MODEL_ID;
                        condwl.TYPE = 3;
                        WEC_MODEL valwl = BLLTable<WEC_MODEL>.GetRowData(condwl);
                        if (valwl != null)
                        {
                            path = valwl.PATH;//"Detail3";//
                            PageBase.AddAscx(this, "BodyPanel", path + ".ascx", "Detail", "~/WECWebsite/Detail/" + path + ".ascx", "cphBody");
                        }
                        else
                        {
                            List<V_WEC_MODEL_SET> listDetail = list.FindAll(delegate(V_WEC_MODEL_SET c1) { return c1.TYPE == 3; });//detail;
                            if (listDetail.Count == 0) return;
                            path = listDetail[0].PATH;//"Detail3";//
                            PageBase.AddAscx(this, "BodyPanel", path + ".ascx", "Detail", "~/WECWebsite/Detail/" + path + ".ascx", "cphBody");
                        }

                    }

                }
            }

            #region

            //if (pagename.ToUpper().Contains("/HOME.ASPX"))
            //{
            //    cond.A_ID = aid;
            //    cond.TYPE = 0;

            //    V_WEC_MODEL_SET val = BLLTable<V_WEC_MODEL_SET>.GetRowData(cond);

            //    if (val != null)
            //    {
            //        PageBase.AddAscx(this, "BodyPanel", val.PATH + ".ascx", "Home", "~/WECWebsite/Home/" + val.PATH + ".ascx", "cphBody");
            //    }
            //}
            //else if (pagename.ToUpper().Contains("/LIST.ASPX"))
            //{
            //    cond = new V_WEC_MODEL_SET();
            //    cond.A_ID = aid;
            //    cond.TYPE = 4;
            //    V_WEC_MODEL_SET val = BLLTable<V_WEC_MODEL_SET>.GetRowData(cond);
            //    if (val != null)
            //    {
            //        PageBase.AddAscx(this, "MenuPanel", val.PATH + ".ascx", "Menu", "~/WECWebsite/Menu/" + val.PATH + ".ascx", "cphMenu");
            //    }

            //    string cid = Common.GetReqStrValue("id");

            //    cond = new V_WEC_MODEL_SET();
            //    cond.A_ID = aid;
            //    cond.TYPE = 2;
            //    val = BLLTable<V_WEC_MODEL_SET>.GetRowData(cond);
            //    if (val != null)
            //    {
            //        PageBase.AddAscx(this, "BodyPanel", val.PATH + ".ascx", "List", "~/WECWebsite/List/" + val.PATH + ".ascx", "cphBody");
            //    }

            //}
            //else if (pagename.ToUpper().Contains("/DETAIL.ASPX"))
            //{
            //    cond = new V_WEC_MODEL_SET();
            //    cond.A_ID = aid;
            //    cond.TYPE = 4;
            //    V_WEC_MODEL_SET val = BLLTable<V_WEC_MODEL_SET>.GetRowData(cond);
            //    if (val != null)
            //    {
            //        PageBase.AddAscx(this, "MenuPanel", val.PATH + ".ascx", "Menu", "~/WECWebsite/Menu/" + val.PATH + ".ascx", "cphMenu");
            //    }

            //    cond = new V_WEC_MODEL_SET();
            //    cond.A_ID = aid;
            //    cond.TYPE = 3;
            //    val = BLLTable<V_WEC_MODEL_SET>.GetRowData(cond);
            //    if (val != null)
            //    {
            //        PageBase.AddAscx(this, "BodyPanel", val.PATH + ".ascx", "Detail", "~/WECWebsite/Detail/" + val.PATH + ".ascx", "cphBody");
            //    }

            //}
            #endregion
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        title = valObj._ZhName + "�༭";
        Page.Title = title;
        if (!string.IsNullOrEmpty(Request["ID"]))
        {
            keyid = Request["ID"];
        }

        if (!string.IsNullOrEmpty(Request["KeyID"]))
        {
            keyid = Request["KeyID"];
        }
        if (Request["deptid"] != null)
        {
            deptid = Request["deptid"];
        }
        if (!IsPostBack)
        {
            WEC_MODEL cond = new WEC_MODEL();
            cond.TYPE = 3;
            txtMODEL_ID.Items.AddRange(FormHelper.GetListItem(WEC_MODEL.Attribute.ID, WEC_MODEL.Attribute.ID, WEC_MODEL.Attribute.NAME, null, cond));
            txtCID.Value = "";
            this.txtID.Disabled = true; this.txtID.Value = "0";
            this.txtID.Attributes["class"] = "dis";
            txtADDTIME.Value = (DateTime.Now).ToString("yyyy-MM-dd");
            try
            {
                if (keyid != "")
                {
                    valObj = BLLTable<WEC_Article>.GetRowData(WEC_Article.Attribute.ID, keyid);
                    if (valObj == null) return;

                    txtID.Value = Convert.ToString(valObj.ID);//Convert.ToDecimal

                    txtCID.Value = Convert.ToString(valObj.CID);//Convert.ToString

                    txtAID.Value = Convert.ToString(valObj.AID);//Convert.ToDecimal

                    txtTITLE.Value = Convert.ToString(valObj.TITLE);//Convert.ToString

                    txtDES.Value = Convert.ToString(valObj.DES);//Convert.ToString

                    txtCONTENT.Value = Convert.ToString(valObj.CONTENT);//Convert.ToString

                    txtURL.Value = Convert.ToString(valObj.URL);//Convert.ToString

                    txtPICURL.Src = valObj.PIC_URL;

                    txtMODEL_ID.Value = Convert.ToString(valObj.MODEL_ID);//Convert.ToDecimal

                    txtADDTIME.Value = (valObj.ADDTIME == DateTime.MinValue) ? "" : valObj.ADDTIME.ToString("yyyy-MM-dd");
                }
                else
                {
                    txtCID.Value = deptid;
                    txtAID.Value = Convert.ToString(userBase2.Curraid);
                }
            }
            catch (Exception ex)
            {
                litWarn.Text = ex.Message;
            }
        }
    }
Example #26
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            WEC_MODEL objCond = new WEC_MODEL();
            objCond.TYPE = 0;

            txtHome.Items.AddRange(FormHelper.GetListItem(WEC_MODEL.Attribute.ID, WEC_MODEL.Attribute.ID, WEC_MODEL.Attribute.NAME, null, objCond));

            objCond      = new WEC_MODEL();
            objCond.TYPE = 1;

            txtChannel.Items.AddRange(FormHelper.GetListItem(WEC_MODEL.Attribute.ID, WEC_MODEL.Attribute.ID, WEC_MODEL.Attribute.NAME, null, objCond));

            objCond      = new WEC_MODEL();
            objCond.TYPE = 2;

            txtList.Items.AddRange(FormHelper.GetListItem(WEC_MODEL.Attribute.ID, WEC_MODEL.Attribute.ID, WEC_MODEL.Attribute.NAME, null, objCond));

            objCond      = new WEC_MODEL();
            objCond.TYPE = 3;

            txtDetail.Items.AddRange(FormHelper.GetListItem(WEC_MODEL.Attribute.ID, WEC_MODEL.Attribute.ID, WEC_MODEL.Attribute.NAME, null, objCond));

            objCond      = new WEC_MODEL();
            objCond.TYPE = 4;

            txtMenu.Items.AddRange(FormHelper.GetListItem(WEC_MODEL.Attribute.ID, WEC_MODEL.Attribute.ID, WEC_MODEL.Attribute.NAME, null, objCond));
            try
            {
                V_WEC_MODEL_SET objvCond = new V_WEC_MODEL_SET();
                objvCond.A_ID = Convert.ToInt32(userBase2.Curraid);

                List <V_WEC_MODEL_SET> lst = BLLTable <V_WEC_MODEL_SET> .Select(new V_WEC_MODEL_SET(), objvCond);

                foreach (V_WEC_MODEL_SET objval in lst)
                {
                    if (objval.TYPE == 0)
                    {
                        txtHome.Value = Convert.ToString(objval.M_ID);
                    }
                    else if (objval.TYPE == 1)
                    {
                        txtChannel.Value = Convert.ToString(objval.M_ID);
                    }
                    else if (objval.TYPE == 2)
                    {
                        txtList.Value = Convert.ToString(objval.M_ID);
                    }
                    else if (objval.TYPE == 3)
                    {
                        txtDetail.Value = Convert.ToString(objval.M_ID);
                    }
                    else if (objval.TYPE == 4)
                    {
                        txtMenu.Value = Convert.ToString(objval.M_ID);
                    }
                }
            }
            catch (Exception ex)
            {
                litWarn.Text = ex.Message;
            }
        }
    }
Example #27
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string pagename = Page.Request.Url.PathAndQuery;

        preUrl = WebHelper.GetAppPath();
        aid    = Common.GetReqIntValue("aid");              //== 0 ? 1 : Common.GetReqIntValue("aid");
        string          id   = Common.GetReqStrValue("id"); // == "" ? "01" : Common.GetReqStrValue("id");
        string          path = "";
        V_WEC_MODEL_SET cond = new V_WEC_MODEL_SET();

        cond.A_ID = aid;
        List <V_WEC_MODEL_SET> list = BLLTable <V_WEC_MODEL_SET> .Select(new V_WEC_MODEL_SET(), cond);

        if (list.Count == 0)
        {
            cond      = new V_WEC_MODEL_SET();
            cond.A_ID = -1;
            list      = BLLTable <V_WEC_MODEL_SET> .Select(new V_WEC_MODEL_SET(), cond);
        }

        if (list.Count != 0)
        {
            List <V_WEC_MODEL_SET> listhome = new List <V_WEC_MODEL_SET>();
            listhome = list.FindAll(delegate(V_WEC_MODEL_SET c1) { return(c1.TYPE == 0); });
            if (listhome.Count == 0)
            {
                return;
            }
            //配置用户控件(list 和menu 都是模板可配置,先找自己的模板,找不到,套用默认模板)
            if (pagename.ToUpper().Contains("/CHANNEL.ASPX"))
            {
                List <V_WEC_MODEL_SET> listmenu = list.FindAll(delegate(V_WEC_MODEL_SET c1) { return(c1.TYPE == 4); });//menu;
                if (listmenu.Count == 0)
                {
                    return;
                }
                path = listmenu[0].PATH;
                PageBase.AddAscx(this, "MenuPanel", path + ".ascx", "Menu", "~/WECWebsite/Menu/" + path + ".ascx", "cphMenu");

                WEC_COLUMN condwn = new WEC_COLUMN();
                condwn.ID = id;
                WEC_COLUMN valwc = BLLTable <WEC_COLUMN> .GetRowData(WEC_COLUMN.Attribute.ID, id);

                if (valwc != null)
                {
                    WEC_MODEL condwl = new WEC_MODEL();
                    condwl.ID   = valwc.MODEL_ID;
                    condwl.TYPE = 5;
                    WEC_MODEL valwl = BLLTable <WEC_MODEL> .GetRowData(condwl);

                    if (valwl != null)
                    {
                        path = valwl.PATH;//"List5";//
                        PageBase.AddAscx(this, "BodyPanel", path + ".ascSSx", "Channel", "~/WECWebsite/Channel/" + path + ".ascx", "cphBody");
                    }
                    else
                    {
                        List <V_WEC_MODEL_SET> listlist = list.FindAll(delegate(V_WEC_MODEL_SET c1) { return(c1.TYPE == 1); });//list;
                        if (listlist.Count == 0)
                        {
                            return;
                        }
                        path = listlist[0].PATH;// "List5"; //
                        PageBase.AddAscx(this, "BodyPanel", path + ".ascSSx", "Channel", "~/WECWebsite/Channel/" + path + ".ascx", "cphBody");
                    }
                }
                //path = listhome[0].PATH;//"channel2";//
                //PageBase.AddAscx(this, "BodyPanel", path + ".ascSSx", "Channel", "~/WECWebsite/Channel/" + path + ".ascx", "cphBody");
            }
            else
            {
                if (pagename.ToUpper().Contains("/HOME.ASPX"))
                {
                    path = listhome[0].PATH;// "home6";//
                    PageBase.AddAscx(this, "BodyPanel", path + ".ascx", "Home", "~/WECWebsite/Home/" + path + ".ascx", "cphBody");
                }
                if (pagename.ToUpper().Contains("/LIST.ASPX"))
                {
                    List <V_WEC_MODEL_SET> listmenu = list.FindAll(delegate(V_WEC_MODEL_SET c1) { return(c1.TYPE == 4); });//menu;
                    if (listmenu.Count == 0)
                    {
                        return;
                    }
                    path = listmenu[0].PATH;
                    PageBase.AddAscx(this, "MenuPanel", path + ".ascx", "Menu", "~/WECWebsite/Menu/" + path + ".ascx", "cphMenu");


                    WEC_COLUMN condwn = new WEC_COLUMN();
                    condwn.ID = id;
                    WEC_COLUMN valwc = BLLTable <WEC_COLUMN> .GetRowData(WEC_COLUMN.Attribute.ID, id);

                    if (valwc != null)
                    {
                        WEC_MODEL condwl = new WEC_MODEL();
                        condwl.ID   = valwc.MODEL_ID;
                        condwl.TYPE = 2;
                        WEC_MODEL valwl = BLLTable <WEC_MODEL> .GetRowData(condwl);

                        if (valwl != null)
                        {
                            path = valwl.PATH;
                            PageBase.AddAscx(this, "BodyPanel", path + ".ascx", "List", "~/WECWebsite/List/" + path + ".ascx", "cphBody");
                        }
                        else
                        {
                            List <V_WEC_MODEL_SET> listlist = list.FindAll(delegate(V_WEC_MODEL_SET c1) { return(c1.TYPE == 2); });//list;
                            if (listlist.Count == 0)
                            {
                                return;
                            }
                            path = listlist[0].PATH;
                            PageBase.AddAscx(this, "BodyPanel", path + ".ascx", "List", "~/WECWebsite/List/" + path + ".ascx", "cphBody");
                        }
                    }
                }
                else if (pagename.ToUpper().Contains("/DETAIL.ASPX"))
                {
                    List <V_WEC_MODEL_SET> listmenu = list.FindAll(delegate(V_WEC_MODEL_SET c1) { return(c1.TYPE == 4); });//menu;
                    if (listmenu.Count == 0)
                    {
                        return;
                    }
                    path = listmenu[0].PATH;
                    PageBase.AddAscx(this, "MenuPanel", path + ".ascx", "Menu", "~/WECWebsite/Menu/" + path + ".ascx", "cphMenu");

                    WEC_Article condwn = new WEC_Article();
                    condwn.ID = Convert.ToDecimal(id);
                    WEC_Article valwc = BLLTable <WEC_Article> .GetRowData(condwn);

                    if (valwc != null)
                    {
                        WEC_MODEL condwl = new WEC_MODEL();
                        condwl.ID   = valwc.MODEL_ID;
                        condwl.TYPE = 3;
                        WEC_MODEL valwl = BLLTable <WEC_MODEL> .GetRowData(condwl);

                        if (valwl != null)
                        {
                            path = valwl.PATH;//"Detail3";//
                            PageBase.AddAscx(this, "BodyPanel", path + ".ascx", "Detail", "~/WECWebsite/Detail/" + path + ".ascx", "cphBody");
                        }
                        else
                        {
                            List <V_WEC_MODEL_SET> listDetail = list.FindAll(delegate(V_WEC_MODEL_SET c1) { return(c1.TYPE == 3); });//detail;
                            if (listDetail.Count == 0)
                            {
                                return;
                            }
                            path = listDetail[0].PATH;//"Detail3";//
                            PageBase.AddAscx(this, "BodyPanel", path + ".ascx", "Detail", "~/WECWebsite/Detail/" + path + ".ascx", "cphBody");
                        }
                    }
                }
            }

            #region

            //if (pagename.ToUpper().Contains("/HOME.ASPX"))
            //{
            //    cond.A_ID = aid;
            //    cond.TYPE = 0;

            //    V_WEC_MODEL_SET val = BLLTable<V_WEC_MODEL_SET>.GetRowData(cond);

            //    if (val != null)
            //    {
            //        PageBase.AddAscx(this, "BodyPanel", val.PATH + ".ascx", "Home", "~/WECWebsite/Home/" + val.PATH + ".ascx", "cphBody");
            //    }
            //}
            //else if (pagename.ToUpper().Contains("/LIST.ASPX"))
            //{
            //    cond = new V_WEC_MODEL_SET();
            //    cond.A_ID = aid;
            //    cond.TYPE = 4;
            //    V_WEC_MODEL_SET val = BLLTable<V_WEC_MODEL_SET>.GetRowData(cond);
            //    if (val != null)
            //    {
            //        PageBase.AddAscx(this, "MenuPanel", val.PATH + ".ascx", "Menu", "~/WECWebsite/Menu/" + val.PATH + ".ascx", "cphMenu");
            //    }

            //    string cid = Common.GetReqStrValue("id");



            //    cond = new V_WEC_MODEL_SET();
            //    cond.A_ID = aid;
            //    cond.TYPE = 2;
            //    val = BLLTable<V_WEC_MODEL_SET>.GetRowData(cond);
            //    if (val != null)
            //    {
            //        PageBase.AddAscx(this, "BodyPanel", val.PATH + ".ascx", "List", "~/WECWebsite/List/" + val.PATH + ".ascx", "cphBody");
            //    }

            //}
            //else if (pagename.ToUpper().Contains("/DETAIL.ASPX"))
            //{
            //    cond = new V_WEC_MODEL_SET();
            //    cond.A_ID = aid;
            //    cond.TYPE = 4;
            //    V_WEC_MODEL_SET val = BLLTable<V_WEC_MODEL_SET>.GetRowData(cond);
            //    if (val != null)
            //    {
            //        PageBase.AddAscx(this, "MenuPanel", val.PATH + ".ascx", "Menu", "~/WECWebsite/Menu/" + val.PATH + ".ascx", "cphMenu");
            //    }

            //    cond = new V_WEC_MODEL_SET();
            //    cond.A_ID = aid;
            //    cond.TYPE = 3;
            //    val = BLLTable<V_WEC_MODEL_SET>.GetRowData(cond);
            //    if (val != null)
            //    {
            //        PageBase.AddAscx(this, "BodyPanel", val.PATH + ".ascx", "Detail", "~/WECWebsite/Detail/" + val.PATH + ".ascx", "cphBody");
            //    }

            //}
            #endregion
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        title = valObj._ZhName + "�༭";
        Page.Title = title;
        if (!string.IsNullOrEmpty(Request["ID"]))
        {
            keyid = Request["ID"];
        }

        if (!string.IsNullOrEmpty(Request["KeyID"]))
        {
            keyid = Request["KeyID"];
        }
        if (!IsPostBack)
        {

            txtTYPE.Items.AddRange(FormHelper.GetListItem(WEC_MODEL.Attribute.TYPE));
            txtADDTIME.Value = (DateTime.Now).ToString("yyyy-MM-dd");
            txtSTATUS.Items.AddRange(FormHelper.GetListItem(WEC_MODEL.Attribute.STATUS));

            this.txtID.Disabled = true; this.txtID.Value = "0";
            this.txtID.Attributes["class"] = "dis";
            try
            {
                if (keyid != "")
                {
                    valObj = BLLTable<WEC_MODEL>.GetRowData(WEC_MODEL.Attribute.ID, keyid);
                    if(valObj==null) return ;

                    txtID.Value = Convert.ToString(valObj.ID);//Convert.ToDecimal

                    txtTYPE.Value=valObj.TYPE.ToString();

                    txtPICURL.Src = valObj.PIC_URL;

                    txtPATH.Value = Convert.ToString(valObj.PATH);//Convert.ToString

                    txtADDTIME.Value = (valObj.ADDTIME == DateTime.MinValue) ? "" : valObj.ADDTIME.ToString("yyyy-MM-dd");

                    txtSTATUS.Value=valObj.STATUS.ToString();

                    txtNAME.Value = Convert.ToString(valObj.NAME);//Convert.ToString
                }
                else
                {
                }
            }
            catch (Exception ex)
            {
                litWarn.Text = ex.Message;
            }
        }
    }
Example #29
0
    protected void btnOK_Click(object sender, EventArgs e)
    {
        try
        {
            WEC_MODEL valObj = new WEC_MODEL();


            if (txtID.Value != "")
            {
                valObj.ID = Convert.ToDecimal(txtID.Value);
            }


            if (txtTYPE.Value != "")
            {
                valObj.TYPE = Convert.ToInt32(txtTYPE.Value);
            }

            valObj.PIC_URL = hidPICURL.Value;

            if (txtPATH.Value != "")
            {
                valObj.PATH = Convert.ToString(txtPATH.Value);
            }

            if (txtADDTIME.Value != "")
            {
                valObj.ADDTIME = Convert.ToDateTime(txtADDTIME.Value);
            }


            if (txtSTATUS.Value != "")
            {
                valObj.STATUS = Convert.ToInt32(txtSTATUS.Value);
            }


            if (txtNAME.Value != "")
            {
                valObj.NAME = Convert.ToString(txtNAME.Value);
            }

            if (keyid != "")
            {
                valObj.ID = Convert.ToDecimal(keyid);
                count     = BLLTable <WEC_MODEL> .Update(valObj, WEC_MODEL.Attribute.ID);
            }
            else
            {
                count = BLLTable <WEC_MODEL> .Insert(valObj, WEC_MODEL.Attribute.ID);

                keyid = valObj.ID.ToString();
            }
            if (count > 0)
            {
                StringBuilder        sbData = new StringBuilder("{valObj:''");
                List <AttributeItem> lstCol = valObj.af_AttributeItemList;
                for (int i = 0; i < lstCol.Count; i++)
                {
                    object val = valObj.GetValue(lstCol[i]);
                    if (val != null)
                    {
                        sbData.Append(",").Append(lstCol[i].FieldName).Append(":'").Append(val.ToString()).Append("'");
                    }
                }
                sbData.Append("}");
                if (ViewState["sbData"] == null)
                {
                    ViewState["sbData"] = sbData.ToString();
                }
                else
                {
                    ViewState["sbData"] += "," + sbData.ToString();
                }
                Button btn = (Button)sender;
                if (btn.ID.IndexOf("btnOK") != -1)
                {
                    if (ViewState["sbData"] == null)
                    {
                        string dataStr = "[" + ViewState["sbData"].ToString() + "]";
                        ScriptManager.RegisterStartupScript(Page, this.GetType(), "goto", "if (window.opener){window.opener.returnValue = '" + dataStr + "';}else{window.returnValue = '" + dataStr + "';}window.close();", true);
                    }
                    else
                    {
                        ScriptManager.RegisterStartupScript(Page, this.GetType(), "goto", "if (window.opener){window.opener.returnValue = 're';}else{window.returnValue = 're';}window.close();", true);
                    }
                }
                else
                {
                    txtID.Value = "";


                    txtTYPE.Value = "";


                    txtPATH.Value = "";


                    txtADDTIME.Value = "";


                    txtSTATUS.Value = "";


                    txtNAME.Value = "";
                }
            }
        }
        catch (Exception ex)
        {
            litWarn.Text = ex.Message;
        }
    }
Example #30
0
    protected void Page_Load(object sender, EventArgs e)
    {
        title      = valObj._ZhName + "详细";
        Page.Title = title;
        if (!IsPostBack)
        {
            try
            {
                if (!string.IsNullOrEmpty(Request["ID"]))
                {
                    valObj = BLLTable <WEC_MODEL> .GetRowData(WEC_MODEL.Attribute.ID, Request["ID"]);

                    if (valObj == null)
                    {
                        return;
                    }


                    txtID.Text = Convert.ToString(valObj.ID);//Convert.ToDecimal


                    txtTYPE.Text = valObj.TYPE.ToString();


                    txtPIC_URL.Text = Convert.ToString(valObj.PIC_URL);//Convert.ToString


                    txtPATH.Text = Convert.ToString(valObj.PATH);//Convert.ToString


                    txtADDTIME.Text = (valObj.ADDTIME == DateTime.MinValue) ? "" : valObj.ADDTIME.ToString("yyyy-MM-dd HH:mm");


                    txtSTATUS.Text = valObj.STATUS.ToString();


                    txtNAME.Text = Convert.ToString(valObj.NAME);//Convert.ToString
                }
            }
            catch (Exception ex)
            {
                litWarn.Text = ex.Message;
            }

            if (Request["ajax"] != null)
            {
                Response.Clear();
                Response.Buffer          = true;
                Response.Charset         = "utf-8";
                Response.ContentEncoding = System.Text.Encoding.GetEncoding("utf-8");//设置输出流为简体中文
                //Response.ContentType = "html/text";

                this.EnableViewState = false;
                System.Globalization.CultureInfo myCItrad        = new System.Globalization.CultureInfo("ZH-CN", true);
                System.IO.StringWriter           oStringWriter   = new System.IO.StringWriter(myCItrad);
                System.Web.UI.HtmlTextWriter     oHtmlTextWriter = new System.Web.UI.HtmlTextWriter(oStringWriter);
                divC.RenderControl(oHtmlTextWriter);

                Response.Write(oStringWriter.ToString());
                Response.End();
            }
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        title      = valObj._ZhName + "编辑";
        Page.Title = title;
        if (!string.IsNullOrEmpty(Request["ID"]))
        {
            if (Request["toEdit"] != null)
            {
                keyid = Request["id"];
            }
            else
            {
                //增加
                title = "增设部门";
                pid   = Request["id"];
            }
        }

        if (!string.IsNullOrEmpty(Request["KeyID"]))
        {
            keyid = Request["KeyID"];
        }
        if (!IsPostBack)
        {
            txtUP_FLAG.Items.AddRange(FormHelper.GetListItem(WEC_COLUMN.Attribute.UP_FLAG));
            WEC_MODEL cond = new WEC_MODEL();
            cond.TYPE = 2;
            txtMODEL_ID.Items.AddRange(FormHelper.GetListItem(WEC_MODEL.Attribute.ID, WEC_MODEL.Attribute.ID, WEC_MODEL.Attribute.NAME, null, cond));
            txtSTATUS.Items.AddRange(FormHelper.GetListItem(WEC_COLUMN.Attribute.STATUS));
            txtADDTIME.Value = (DateTime.Now).ToString("yyyy-MM-dd");

            this.txtID.Disabled             = true; this.txtID.Value = "0";
            this.txtID.Attributes["class"]  = "dis";
            this.txtPID.Attributes["class"] = "dis";
            try
            {
                if (keyid != "")
                {
                    valObj = BLLTable <WEC_COLUMN> .GetRowData(WEC_COLUMN.Attribute.ID, keyid);

                    if (valObj == null)
                    {
                        return;
                    }


                    txtID.Value = Convert.ToString(valObj.ID);                   //Convert.ToString

                    txtPID.Value = Convert.ToString(valObj.PID);                 //Convert.ToString

                    txtCOLUMN_NAME.Value = Convert.ToString(valObj.COLUMN_NAME); //Convert.ToString

                    txtCOLUMN_DES.Value = Convert.ToString(valObj.COLUMN_DES);   //Convert.ToString

                    txtOUT_URL.Value = Convert.ToString(valObj.OUT_URL);         //Convert.ToString

                    txtPICURL.Src = valObj.PIC_URL;

                    txtSMALL_PIC.Src = valObj.SMALL_PIC;

                    txtUP_FLAG.Value = valObj.UP_FLAG.ToString();

                    txtMODEL_ID.Value = Convert.ToString(valObj.MODEL_ID);//Convert.ToDecimal

                    txtSTATUS.Value = valObj.STATUS.ToString();

                    txtADDTIME.Value = (valObj.ADDTIME == DateTime.MinValue) ? "" : valObj.ADDTIME.ToString("yyyy-MM-dd");

                    txtSORT_ID.Value = Convert.ToString(valObj.SORT_ID);//Convert.ToInt32
                }
                else
                {
                    txtID.Value  = GetNewDeptID(pid);
                    txtPID.Value = pid;
                }
            }
            catch (Exception ex)
            {
                litWarn.Text = ex.Message;
            }
        }
    }
Example #32
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            WEC_MODEL objCond = new WEC_MODEL();
            objCond.TYPE = 0;

            txtHome.Items.AddRange(FormHelper.GetListItem(WEC_MODEL.Attribute.ID, WEC_MODEL.Attribute.ID, WEC_MODEL.Attribute.NAME, null, objCond));

            objCond = new WEC_MODEL();
            objCond.TYPE = 1;

            txtChannel.Items.AddRange(FormHelper.GetListItem(WEC_MODEL.Attribute.ID, WEC_MODEL.Attribute.ID, WEC_MODEL.Attribute.NAME, null, objCond));

            objCond = new WEC_MODEL();
            objCond.TYPE = 2;

            txtList.Items.AddRange(FormHelper.GetListItem(WEC_MODEL.Attribute.ID, WEC_MODEL.Attribute.ID, WEC_MODEL.Attribute.NAME, null, objCond));

            objCond = new WEC_MODEL();
            objCond.TYPE = 3;

            txtDetail.Items.AddRange(FormHelper.GetListItem(WEC_MODEL.Attribute.ID, WEC_MODEL.Attribute.ID, WEC_MODEL.Attribute.NAME, null, objCond));

            objCond = new WEC_MODEL();
            objCond.TYPE = 4;

            txtMenu.Items.AddRange(FormHelper.GetListItem(WEC_MODEL.Attribute.ID, WEC_MODEL.Attribute.ID, WEC_MODEL.Attribute.NAME, null, objCond));
            try
            {
                V_WEC_MODEL_SET objvCond = new V_WEC_MODEL_SET();
                objvCond.A_ID = Convert.ToInt32(userBase2.Curraid);

                List<V_WEC_MODEL_SET> lst = BLLTable<V_WEC_MODEL_SET>.Select(new V_WEC_MODEL_SET(), objvCond);
                foreach (V_WEC_MODEL_SET objval in lst)
                {
                    if (objval.TYPE == 0)
                    {
                        txtHome.Value = Convert.ToString(objval.M_ID);
                    }
                    else if (objval.TYPE == 1)
                    {
                        txtChannel.Value = Convert.ToString(objval.M_ID);
                    }
                    else if (objval.TYPE == 2)
                    {
                        txtList.Value = Convert.ToString(objval.M_ID);
                    }
                    else if (objval.TYPE == 3)
                    {
                        txtDetail.Value = Convert.ToString(objval.M_ID);
                    }
                    else if (objval.TYPE == 4)
                    {
                        txtMenu.Value = Convert.ToString(objval.M_ID);
                    }
                }

            }
            catch (Exception ex)
            {
                litWarn.Text = ex.Message;
            }
        }
    }