Esempio n. 1
0
    protected void btnFind_Click(object sender, EventArgs e)
    {
        condObj = new SYS_APP();

        if(txtAPP_ID.Value != "" )
            condObj.Like(SYS_APP.Attribute.APP_ID, Convert.ToString(txtAPP_ID.Value));

        if(txtAPP_NAME.Value != "" )
            condObj.Like(SYS_APP.Attribute.APP_NAME, Convert.ToString(txtAPP_NAME.Value));

        if(txtAPP_LABEL.Value != "" )
            condObj.Like(SYS_APP.Attribute.APP_LABEL, Convert.ToString(txtAPP_LABEL.Value));

        if(txtDEFAULT_URL.Value != "" )
            condObj.Like(SYS_APP.Attribute.DEFAULT_URL, Convert.ToString(txtDEFAULT_URL.Value));

        if(txtDEFAULT_URL_NAME.Value != "" )
            condObj.Like(SYS_APP.Attribute.DEFAULT_URL_NAME, Convert.ToString(txtDEFAULT_URL_NAME.Value));

        if(txtIsBigSystem.Value != "" )
            condObj.IsBigSystem = Convert.ToBoolean(txtIsBigSystem.Value);

        if(txtNote.Value != "" )
            condObj.Like(SYS_APP.Attribute.Note, Convert.ToString(txtNote.Value));

        if(txtAPP_IMG.Value != "" )
            condObj.Like(SYS_APP.Attribute.APP_IMG, Convert.ToString(txtAPP_IMG.Value));

        hidCondition.Value = condObj.ToJson(20);

        BindList(condObj, 1);
    }
Esempio n. 2
0
 protected void aspPager_PageChanged(object sender, EventArgs e)
 {
     if (hidCondition.Value != "")
     {
         condObj = JsonServiceBase.FromJson<SYS_APP>(hidCondition.Value);
     }
     BindList(condObj, aspPager.CurrentPageIndex);
 }
Esempio n. 3
0
 protected void btnSetPageSize_Click(object sender, EventArgs e)
 {
     aspPager.PageSize = int.Parse(txtPageSize.Value);
     if (hidCondition.Value != "")
     {
         condObj = JsonServiceBase.FromJson<SYS_APP>(hidCondition.Value);
     }
     BindList(condObj, aspPager.CurrentPageIndex);
 }
Esempio n. 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["APP_ID"]))
                {
                    valObj = BLLTable<SYS_APP>.Factory(conn).GetRowData(SYS_APP.Attribute.APP_ID, Request["APP_ID"]);
                    if(valObj==null) return ;

                    txtAPP_ID.Text = Convert.ToString(valObj.APP_ID);//Convert.ToString

                    txtAPP_NAME.Text = Convert.ToString(valObj.APP_NAME);//Convert.ToString

                    txtAPP_LABEL.Text = Convert.ToString(valObj.APP_LABEL);//Convert.ToString

                    txtDEFAULT_URL.Text = Convert.ToString(valObj.DEFAULT_URL);//Convert.ToString

                    txtDEFAULT_URL_NAME.Text = Convert.ToString(valObj.DEFAULT_URL_NAME);//Convert.ToString

                    txtIsBigSystem.Text=valObj.IsBigSystem.ToString();

                    txtNote.Text = Convert.ToString(valObj.Note);//Convert.ToString

                    txtAPP_IMG.Text = Convert.ToString(valObj.APP_IMG);//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();
            }
        }
    }
Esempio n. 5
0
    protected void aspPager_PageChanged(object sender, EventArgs e)
    {
        try
        {
            if (hidCondition.Value != "")
            {
                condObj = JsonServiceBase.FromJson<SYS_APP>(hidCondition.Value);
            }
            listObj = BLLTable<SYS_APP>.Factory(conn).SelectByPage(valObj, condObj, aspPager.PageSize, aspPager.CurrentPageIndex, ref recount);

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

        if(txtAPP_ID.Value !="" )
            condObj.Like_OR(SYS_APP.Attribute.APP_ID, Convert.ToString(txtAPP_ID.Value));

        if(txtAPP_ID.Value !="" )
            condObj.Like_OR(SYS_APP.Attribute.APP_ID, Convert.ToString(txtAPP_ID.Value));

        if(txtAPP_ID.Value !="" )
            condObj.Like_OR(SYS_APP.Attribute.APP_ID, Convert.ToString(txtAPP_ID.Value));

        if(txtAPP_ID.Value !="" )
            condObj.Like_OR(SYS_APP.Attribute.APP_ID, Convert.ToString(txtAPP_ID.Value));

        if(txtAPP_ID.Value !="" )
            condObj.Like_OR(SYS_APP.Attribute.APP_ID, Convert.ToString(txtAPP_ID.Value));

        if(txtAPP_ID.Value !="" )
            condObj.APP_ID = Convert.ToString(txtAPP_ID.Value);

        if(txtAPP_ID.Value !="" )
            condObj.Like_OR(SYS_APP.Attribute.APP_ID, Convert.ToString(txtAPP_ID.Value));

        if(txtAPP_ID.Value !="" )
            condObj.Like_OR(SYS_APP.Attribute.APP_ID, Convert.ToString(txtAPP_ID.Value));

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

            listObj = BLLTable<SYS_APP>.Factory(conn).SelectByPage(valObj, condObj, aspPager.PageSize, 1, ref recount);
            repList.DataSource = listObj;
            repList.DataBind();
        }
        catch (Exception ex)
        {
             litWarn.Text = ex.Message;
        }
    }
Esempio n. 7
0
    protected void btnFind_Click(object sender, EventArgs e)
    {
        try
        {
            condObj = new SYS_APP();

            if(txtAPP_ID.Value !="" )
                condObj.Like(SYS_APP.Attribute.APP_ID, Convert.ToString(txtAPP_ID.Value));

            if(txtAPP_NAME.Value !="" )
                condObj.Like(SYS_APP.Attribute.APP_NAME, Convert.ToString(txtAPP_NAME.Value));

            if(txtAPP_LABEL.Value !="" )
                condObj.Like(SYS_APP.Attribute.APP_LABEL, Convert.ToString(txtAPP_LABEL.Value));

            if(txtDEFAULT_URL.Value !="" )
                condObj.Like(SYS_APP.Attribute.DEFAULT_URL, Convert.ToString(txtDEFAULT_URL.Value));

            if(txtDEFAULT_URL_NAME.Value !="" )
                condObj.Like(SYS_APP.Attribute.DEFAULT_URL_NAME, Convert.ToString(txtDEFAULT_URL_NAME.Value));

            if(txtIsBigSystem.Value !="" )
                condObj.IsBigSystem = Convert.ToBoolean(txtIsBigSystem.Value);

            if(txtNote.Value !="" )
                condObj.Like(SYS_APP.Attribute.Note, Convert.ToString(txtNote.Value));

            if(txtAPP_IMG.Value !="" )
                condObj.Like(SYS_APP.Attribute.APP_IMG, Convert.ToString(txtAPP_IMG.Value));

            listObj = BLLTable<SYS_APP>.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;
    }
Esempio n. 8
0
    protected void btnOK_Click(object sender, EventArgs e)
    {
        try
        {
            SYS_APP valObj = new SYS_APP();

            if(txtAPP_ID.Value !="" )
                valObj.APP_ID = Convert.ToString(txtAPP_ID.Value);

            if(txtAPP_NAME.Value !="" )
                valObj.APP_NAME = Convert.ToString(txtAPP_NAME.Value);

            if(txtAPP_LABEL.Value !="" )
                valObj.APP_LABEL = Convert.ToString(txtAPP_LABEL.Value);

            if(txtDEFAULT_URL.Value !="" )
                valObj.DEFAULT_URL = Convert.ToString(txtDEFAULT_URL.Value);

            if(txtDEFAULT_URL_NAME.Value !="" )
                valObj.DEFAULT_URL_NAME = Convert.ToString(txtDEFAULT_URL_NAME.Value);

            if(txtIsBigSystem.Value !="" )
                valObj.IsBigSystem = Convert.ToBoolean(txtIsBigSystem.Value);

            if(txtNote.Value !="" )
                valObj.Note = Convert.ToString(txtNote.Value);

            valObj.APP_IMG =  hidtxtAPP_IMG.Value;

            if (keyid != "")
            {
                valObj.APP_ID = Convert.ToString(keyid);
                count = BLLTable<SYS_APP>.Factory(conn).Update(valObj, SYS_APP.Attribute.APP_ID);
            }
            else
            {
                count = BLLTable<SYS_APP>.Factory(conn).Insert(valObj, SYS_APP.Attribute.APP_ID);
                keyid = valObj.APP_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
                {

                    txtAPP_ID.Value ="";

                    txtAPP_NAME.Value ="";

                    txtAPP_LABEL.Value ="";

                    txtDEFAULT_URL.Value ="";

                    txtDEFAULT_URL_NAME.Value ="";

                    txtIsBigSystem.Value ="";

                    txtNote.Value ="";

                    txtAPP_IMG.Src ="";
                }
            }
        }
        catch (Exception ex)
        {
            litWarn.Text = ex.Message;
        }
    }
Esempio n. 9
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //zlg �����ģ�飬��������
        valObj.setConn(conn).setModule(ModuleName);

        title = valObj._ZhName + "�༭";
        Page.Title = title;
        if (!string.IsNullOrEmpty(Request["APP_ID"]))
        {
            keyid = Request["APP_ID"];
        }

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

            txtIsBigSystem.Items.AddRange(FormHelper.GetListItem(SYS_APP.Attribute.IsBigSystem));

            this.txtAPP_ID.Disabled = true; this.txtAPP_ID.Value = "0";
            this.txtAPP_ID.Attributes["class"] = "hide";
            try
            {
                if (keyid != "")
                {
                    valObj = BLLTable<SYS_APP>.Factory(conn).GetRowData(SYS_APP.Attribute.APP_ID, keyid);
                    if (valObj == null) return;

                    txtAPP_ID.Value = Convert.ToString(valObj.APP_ID);//Convert.ToString

                    txtAPP_NAME.Value = Convert.ToString(valObj.APP_NAME);//Convert.ToString

                    txtAPP_LABEL.Value = Convert.ToString(valObj.APP_LABEL);//Convert.ToString

                    txtDEFAULT_URL.Value = Convert.ToString(valObj.DEFAULT_URL);//Convert.ToString

                    txtDEFAULT_URL_NAME.Value = Convert.ToString(valObj.DEFAULT_URL_NAME);//Convert.ToString

                    txtIsBigSystem.Value = valObj.IsBigSystem.ToString();

                    txtNote.Value = Convert.ToString(valObj.Note);//Convert.ToString

                    txtAPP_IMG.Src = valObj.APP_IMG;
                }
            }
            catch (Exception ex)
            {
                litWarn.Text = ex.Message;
            }
        }
    }
Esempio n. 10
0
    private void BindList(SYS_APP condObj, int curPage)
    {
        if (condObj.af_PageByAttributeItem == null)//����������û�����ķ�ҳ�������ԣ�����������������
            condObj.af_PageBy(SYS_APP.Attribute.APP_ID, Order.Desc);

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

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

        listObj = BLLTable<SYS_APP>.Factory(conn).SelectByPage(valObj, condObj, aspPager.PageSize, curPage, ref recount);
        repList.DataSource = listObj;
        repList.DataBind();
        aspPager.RecordCount = recount;
    }
Esempio n. 11
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //zlg �����ģ�飬��������
        valObj.setConn(conn).setModule(ModuleName);

        #region//Ĭ�����ص���
        //hideTableColumnList = new List<AttributeItem>();
        //hideTableColumnList.Add(SYS_APP.Attribute.EXP1);
        //hideTableColumnList.Add(SYS_APP.Attribute.EXP2);
        //hideTableColumnList.Add(SYS_APP.Attribute.EXP3);
        //valObj.LoadAllAttributes(true);//��ʱ�Ӵ˴��룬�Ժ��ܸ��½�����Ҫ
        //valObj.Remove(hideTableColumnList);

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

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

            if (!string.IsNullOrEmpty(Request["ids"]))
            {
                SYS_APP roleOld = new SYS_APP();
                roleOld.Where(SYS_APP.Attribute.APP_ID, Request["ids"].ToString());
                listObj = BLLTable<SYS_APP>.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].APP_ID + "',Name:'" + listObj[i].APP_ID + "'}";//�����Name������ʾ���б��У��������ض��塣
                    hidInitIDS.Value += listObj[i].APP_ID;
                }
            }
            try
            {

                listObj = BLLTable<SYS_APP>.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;
            }

        }
    }