예제 #1
0
    protected void btnFind_Click(object sender, EventArgs e)
    {
        condObj = new SYS_BILL_OPRLOG();
        if (txtTABLE_NAME.Value != "")
        {
            condObj.Like(SYS_BILL_OPRLOG.Attribute.TABLE_NAME, Convert.ToString(txtTABLE_NAME.Value));
        }

        if (txtDB_SRC_NAME.Value != "")
        {
            condObj.Like(SYS_BILL_OPRLOG.Attribute.DB_SRC_NAME, Convert.ToString(txtDB_SRC_NAME.Value));
        }

        if (txtOPR_TYPE.Value != "")
        {
            condObj.Like(SYS_BILL_OPRLOG.Attribute.OPR_TYPE, Convert.ToString(txtOPR_TYPE.Value));
        }


        if (txtSTATUS.Value != "")
        {
            condObj.Like(SYS_BILL_OPRLOG.Attribute.STATUS, Convert.ToString(txtSTATUS.Value));
        }

        hidCondition.Value = condObj.ToJson(20);

        BindList(condObj, 1);
    }
예제 #2
0
 protected void btnSetPageSize_Click(object sender, EventArgs e)
 {
     if (hidCondition.Value != "")
     {
         condObj = JsonServiceBase.FromJson<SYS_BILL_OPRLOG>(hidCondition.Value);
     }
     BindList(condObj, aspPager.CurrentPageIndex);
 }
예제 #3
0
 protected void btnSetPageSize_Click(object sender, EventArgs e)
 {
     if (hidCondition.Value != "")
     {
         condObj = JsonServiceBase.FromJson <SYS_BILL_OPRLOG>(hidCondition.Value);
     }
     BindList(condObj, aspPager.CurrentPageIndex);
 }
예제 #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //在列表里点击删除按钮,通过AJAX执行这里的后台代码,删除一条记录
        if (Request["DelLOG_ID"] != null)
        {
            int re = BLLTable <SYS_BILL_OPRLOG> .Factory(conn).Delete(SYS_BILL_OPRLOG.Attribute.LOG_ID, Request["DelLOG_ID"]);

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

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

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

        //在用户详细信息查看编辑页面,点保存时,通过AJAX执行这里的后台代码,实现部门字段的更新
        if (Request["saveInfo"] != null)
        {
            SYS_BILL_OPRLOG val = new SYS_BILL_OPRLOG();
            val.LOG_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 <SYS_BILL_OPRLOG> .Factory(conn).Update(val, SYS_BILL_OPRLOG.Attribute.LOG_ID);

            Response.Write("修改用户信息成功");
        }
        Response.End();
    }
예제 #5
0
    private void BindList(SYS_BILL_OPRLOG condObj, int curPage)
    {
        if (condObj.af_PageByAttributeItem == null)//如果不存在用户定义的分页排序属性,则用主键属性排序
        {
            condObj.af_PageBy(SYS_BILL_OPRLOG.Attribute.LOG_ID, Order.Desc);
        }

        listObj = BLLTable <SYS_BILL_OPRLOG> .Factory(conn).SelectByPage(valObj, condObj, aspPager.PageSize, curPage, ref recount);

        repList.DataSource = listObj;
        repList.DataBind();
        aspPager.RecordCount = recount;
    }
예제 #6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //���б�����ɾ����ť��ͨ��AJAXִ������ĺ�̨���룬ɾ��һ����¼
        if (Request["DelLOG_ID"] != null)
        {
            int re = BLLTable<SYS_BILL_OPRLOG>.Factory(conn).Delete(SYS_BILL_OPRLOG.Attribute.LOG_ID, Request["DelLOG_ID"]);
            if (re > 0)
            {
                Response.Write("1");//����������� ����0 ��ʾ�����ɹ���Ҳ����ֱ����� �ַ������ͻ��˽��������ַ�����Ϣ��Ϊ��ʾ
            }
            else
            {
                Response.Write("ɾ��ʧ�ܣ�");
            }
        }

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

        //���û���ϸ��Ϣ�鿴�༭ҳ�棬�㱣��ʱ��ͨ��AJAXִ������ĺ�̨���룬ʵ�ֲ����ֶεĸ���
        if (Request["saveInfo"] != null)
        {
            SYS_BILL_OPRLOG val = new SYS_BILL_OPRLOG();
            val.LOG_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<SYS_BILL_OPRLOG>.Factory(conn).Update(val, SYS_BILL_OPRLOG.Attribute.LOG_ID);
            Response.Write("�޸��û���Ϣ�ɹ�");

        }
        Response.End();
    }
예제 #7
0
    protected void btnFind_Click(object sender, EventArgs e)
    {
        condObj = new SYS_BILL_OPRLOG();
        if (txtTABLE_NAME.Value != "")
            condObj.Like(SYS_BILL_OPRLOG.Attribute.TABLE_NAME, Convert.ToString(txtTABLE_NAME.Value));

        if (txtDB_SRC_NAME.Value != "")
            condObj.Like(SYS_BILL_OPRLOG.Attribute.DB_SRC_NAME, Convert.ToString(txtDB_SRC_NAME.Value));

        if (txtOPR_TYPE.Value != "")
            condObj.Like(SYS_BILL_OPRLOG.Attribute.OPR_TYPE, Convert.ToString(txtOPR_TYPE.Value));

        if (txtSTATUS.Value != "")
            condObj.Like(SYS_BILL_OPRLOG.Attribute.STATUS, Convert.ToString(txtSTATUS.Value));

        hidCondition.Value = condObj.ToJson(20);

        BindList(condObj, 1);
    }
예제 #8
0
    private void BindList(SYS_BILL_OPRLOG condObj, int curPage)
    {
        if (condObj.af_PageByAttributeItem == null)//����������û�����ķ�ҳ�������ԣ�����������������
            condObj.af_PageBy(SYS_BILL_OPRLOG.Attribute.LOG_ID, Order.Desc);

        listObj = BLLTable<SYS_BILL_OPRLOG>.Factory(conn).SelectByPage(valObj, condObj, aspPager.PageSize, curPage, ref recount);
        repList.DataSource = listObj;
        repList.DataBind();
        aspPager.RecordCount = recount;
    }