protected void Page_Load(object sender, EventArgs e)
    {
        //zlg 如果有模块,则先配置
        valObj.setConn(conn).setModule(ModuleName);

        #region//默认隐藏的列
        //hideTableColumnList = new List<AttributeItem>();
        //hideTableColumnList.Add(APP_STATISTICS.Attribute.EXP1);
        //hideTableColumnList.Add(APP_STATISTICS.Attribute.EXP2);
        //hideTableColumnList.Add(APP_STATISTICS.Attribute.EXP3);
        //valObj.LoadAllAttributes(true);//暂时加此代码,以后框架更新将不需要
        //valObj.Remove(hideTableColumnList);

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

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

            if (!string.IsNullOrEmpty(Request["ids"]))
            {
                APP_STATISTICS roleOld = new APP_STATISTICS();
                roleOld.Where(APP_STATISTICS.Attribute.ID, Request["ids"].ToString());
                listObj = BLLTable <APP_STATISTICS> .Factory(conn).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 <APP_STATISTICS> .Factory(conn).SelectByPage(valObj, condObj, aspPager.PageSize, 1, ref recount);

                repList.DataSource = listObj;
                repList.DataBind();
                aspPager.RecordCount = recount;
            }
            catch (Exception ex)
            {
                litWarn.Text = ex.Message;
            }
        }
    }
Beispiel #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //zlg 如果有模块,则先配置
        valObj.setConn(conn).setModule(ModuleName);

        #region//默认隐藏的列
        //hideTableColumnList = new List<AttributeItem>();
        //hideTableColumnList.Add(APP_STATISTICS.Attribute.EXP1);
        //hideTableColumnList.Add(APP_STATISTICS.Attribute.EXP2);
        //hideTableColumnList.Add(APP_STATISTICS.Attribute.EXP3);
        //valObj.LoadAllAttributes(true);//暂时加此代码,以后框架更新将不需要
        //valObj.Remove(hideTableColumnList);

        //hideFindColumnList = new List<AttributeItem>();
        //hideFindColumnList.Add(APP_STATISTICS.Attribute.EXP1);
        //hideFindColumnList.Add(APP_STATISTICS.Attribute.EXP2);
        //hideFindColumnList.Add(APP_STATISTICS.Attribute.EXP3);
        #endregion
        title      = valObj._ZhName + "管理";
        Page.Title = title;
        if (Request["PID"] != null)
        {
            pid = Request["PID"];
        }
        if (!IsPostBack)
        {
            #region//默认属性初始化
            aspPager.CurrentPageIndex = 1;
            //aspPager.ShowInputBox = AgileFrame.Core.WebSystem.WebCtrls.ShowInputBox.Auto;
            txtPageSize.Value = "30";
            aspPager.PageSize = 30;
            //if (pid == "" || pid == "0")
            //{
            //    a_top.Visible = false;
            //}
            #endregion
            #region                                  //数据初始化

            txtAPP_STATISTICS_AF_ADDTIME.Value = ""; //Convert.ToDateTime(DateTime.Now);
            #endregion

            BindList(condObj, 1);
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        //zlg 如果有模块,则先配置
        valObj.setConn(conn).setModule(ModuleName);

        #region//默认隐藏的列
        //hideTableColumnList = new List<AttributeItem>();
        //hideTableColumnList.Add(APP_STATISTICS.Attribute.EXP1);
        //hideTableColumnList.Add(APP_STATISTICS.Attribute.EXP2);
        //hideTableColumnList.Add(APP_STATISTICS.Attribute.EXP3);
        //valObj.LoadAllAttributes(true);//暂时加此代码,以后框架更新将不需要
        //valObj.Remove(hideTableColumnList);

        //hideFindColumnList = new List<AttributeItem>();
        //hideFindColumnList.Add(APP_STATISTICS.Attribute.EXP1);
        //hideFindColumnList.Add(APP_STATISTICS.Attribute.EXP2);
        //hideFindColumnList.Add(APP_STATISTICS.Attribute.EXP3);
        #endregion
        //多级数据表页面才用到
        if (Request["PID"] != null)
        {
            pid = Request["PID"];
        }
        title      = valObj._ZhName + "选择";
        Page.Title = title;
        if (!IsPostBack)
        {
            aspPager.CurrentPageIndex = 1;
            aspPager.PageSize         = 20;
            try
            {
                listObj = BLLTable <APP_STATISTICS> .Factory(conn).SelectByPage(valObj, condObj, aspPager.PageSize, 1, ref recount);

                repCus.DataSource = listObj;
                repCus.DataBind();
            }
            catch (Exception ex)
            {
                litWarn.Text = ex.Message;
            }
            aspPager.RecordCount = recount;
        }
    }
Beispiel #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //zlg 如果有模块,则先配置
        valObj.setConn(conn).setModule(ModuleName);

        title      = valObj._ZhName + "详细";
        Page.Title = title;
        if (!IsPostBack)
        {
            try
            {
                if (!string.IsNullOrEmpty(Request["ID"]))
                {
                    valObj = BLLTable <APP_STATISTICS> .Factory(conn).GetRowData(APP_STATISTICS.Attribute.ID, Request["ID"]);

                    if (valObj == null)
                    {
                        return;
                    }


                    txtAPP_STATISTICS_ID.Text = Convert.ToString(valObj.ID);//Convert.ToInt32


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


                    txtAPP_STATISTICS_IP.Text = Convert.ToString(valObj.IP);//Convert.ToString


                    txtAPP_STATISTICS_LONG.Text = Convert.ToString(valObj.LONG);//Convert.ToString


                    txtAPP_STATISTICS_LAT.Text = Convert.ToString(valObj.LAT);//Convert.ToString


                    txtAPP_STATISTICS_DEVICE_SYS.Text = Convert.ToString(valObj.DEVICE_SYS);//Convert.ToString


                    txtAPP_STATISTICS_VER_CODE.Text = Convert.ToString(valObj.VER_CODE);//Convert.ToString


                    txtAPP_STATISTICS_DEVICE_MODEL.Text = Convert.ToString(valObj.DEVICE_MODEL);//Convert.ToString


                    txtAPP_STATISTICS_STAFF_ID.Text = Convert.ToString(valObj.STAFF_ID);//Convert.ToDecimal


                    txtAPP_STATISTICS_DEVICE_ID.Text = Convert.ToString(valObj.DEVICE_ID);//Convert.ToString


                    txtAPP_STATISTICS_VER_NAME.Text = Convert.ToString(valObj.VER_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)
    {
        //zlg 如果有模块,则先配置
        valObj.setConn(conn).setModule(ModuleName);

        title      = valObj._ZhName + "编辑";
        Page.Title = title;
        if (!string.IsNullOrEmpty(Request["ID"]))
        {
            keyid = Request["ID"];
        }

        if (!string.IsNullOrEmpty(Request["KeyID"]))
        {
            keyid = Request["KeyID"];
        }
        if (!string.IsNullOrEmpty(Request["record"]))
        {
            keyid = Request["record"];
        }
        if (!IsPostBack)
        {
            txtAPP_STATISTICS_AF_ADDTIME.Value = (DateTime.Now).ToString("yyyy-MM-dd");

            this.txtAPP_STATISTICS_ID.Disabled            = true; this.txtAPP_STATISTICS_ID.Value = "0";
            this.txtAPP_STATISTICS_ID.Attributes["class"] = "hide";
            try
            {
                if (keyid != "")
                {
                    valObj = BLLTable <APP_STATISTICS> .Factory(conn).GetRowData(APP_STATISTICS.Attribute.ID, keyid);

                    if (valObj == null)
                    {
                        return;
                    }


                    txtAPP_STATISTICS_ID.Value = Convert.ToString(valObj.ID);//Convert.ToInt32

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

                    txtAPP_STATISTICS_IP.Value = Convert.ToString(valObj.IP);                     //Convert.ToString

                    txtAPP_STATISTICS_LONG.Value = Convert.ToString(valObj.LONG);                 //Convert.ToString

                    txtAPP_STATISTICS_LAT.Value = Convert.ToString(valObj.LAT);                   //Convert.ToString

                    txtAPP_STATISTICS_DEVICE_SYS.Value = Convert.ToString(valObj.DEVICE_SYS);     //Convert.ToString

                    txtAPP_STATISTICS_VER_CODE.Value = Convert.ToString(valObj.VER_CODE);         //Convert.ToString

                    txtAPP_STATISTICS_DEVICE_MODEL.Value = Convert.ToString(valObj.DEVICE_MODEL); //Convert.ToString

                    txtAPP_STATISTICS_STAFF_ID.Value = Convert.ToString(valObj.STAFF_ID);         //Convert.ToDecimal

                    txtAPP_STATISTICS_DEVICE_ID.Value = Convert.ToString(valObj.DEVICE_ID);       //Convert.ToString

                    txtAPP_STATISTICS_VER_NAME.Value = Convert.ToString(valObj.VER_NAME);         //Convert.ToString
                }
            }
            catch (Exception ex)
            {
                litWarn.Text = ex.Message;
            }
        }
    }