Пример #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!string.IsNullOrEmpty(Request["PROCID"]))
        {
            procid = int.Parse(Request["PROCID"]);
        }
        if (Request["STEP_ID"] != null)
        {
            stepid = Request["STEP_ID"];
        }
        title      = valObj._ZhName + "Ñ¡Ôñ";
        Page.Title = title;
        if (!IsPostBack)
        {
            condObj.PROCID = procid;
            condObj.In(WF_STEP_TPL.Attribute.STEP_TYPE, "1,2");
            if (Request["selType"] != null)
            {
                condObj.STEP_TYPE = int.Parse(Request["selType"]);
                selType           = Request["selType"];
            }
            try
            {
                listObj = BLLTable <WF_STEP_TPL> .Factory(conn).Select(valObj, condObj);

                repCus.DataSource = listObj;
                repCus.DataBind();
            }
            catch (Exception ex)
            {
                litWarn.Text = ex.Message;
            }
        }
    }
Пример #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //���б�����ɾ����ť��ͨ��AJAXִ������ĺ�̨���룬ɾ��һ����¼
        if (Request["DelPROCID"] != null)
        {
            if (BLLTable<WF_STEP_TPL>.Factory(conn).GetRowData(WF_STEP_TPL.Attribute.PROCID, Request["DelPROCID"]) == null)
            {

                int re = BLLTable<WF_PROCESS_TPL>.Factory(conn).Delete(WF_PROCESS_TPL.Attribute.PROCID, Request["DelPROCID"]);
                if (re > 0)
                {
                    Response.Write("1");//����������� ����0 ��ʾ�����ɹ���Ҳ����ֱ����� �ַ������ͻ��˽��������ַ�����Ϣ��Ϊ��ʾ
                }
                else
                {
                    Response.Write("ɾ��ʧ�ܣ�");
                }
            }
            else {
                Response.Write("����ɾ����");
            }
        }
        if (Request["DelByKeyID"] != null)
        {
            string msg = "";
            DelPROC(int.Parse(Request["WFID"]), int.Parse(Request["DelByKeyID"]), ref msg);
            Response.Write(msg);
        }

        //���б�������ɾ����ť��ͨ��AJAXִ������ĺ�̨���룬ɾ��������¼
        if (Request["DelKeyIDS"] != null)
        {
            WF_STEP_TPL cond1 = new WF_STEP_TPL();
            cond1.In(WF_STEP_TPL.Attribute.PROCID, Request["DelKeyIDS"]);
            if (!BLLTable<WF_STEP_TPL>.Exists(cond1))
            {

                WF_PROCESS_TPL cond = new WF_PROCESS_TPL();
                cond.In(WF_PROCESS_TPL.Attribute.PROCID, Request["DelKeyIDS"]);
                int re = BLLTable<WF_PROCESS_TPL>.Factory(conn).Delete(cond);
                if (re > 0)
                {
                    Response.Write("1");//����������� ����0 ��ʾ�����ɹ���Ҳ����ֱ����� �ַ������ͻ��˽��������ַ�����Ϣ��Ϊ��ʾ
                }
                else
                {
                    Response.Write("ɾ��ʧ�ܣ�");
                }
            }
            else
            {
                Response.Write("����ɾ����");
            }
        }

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

        }
        Response.End();
    }
Пример #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //在列表里点击删除按钮,通过AJAX执行这里的后台代码,删除一条记录
        if (Request["DelPROCID"] != null)
        {
            if (BLLTable <WF_STEP_TPL> .Factory(conn).GetRowData(WF_STEP_TPL.Attribute.PROCID, Request["DelPROCID"]) == null)
            {
                int re = BLLTable <WF_PROCESS_TPL> .Factory(conn).Delete(WF_PROCESS_TPL.Attribute.PROCID, Request["DelPROCID"]);

                if (re > 0)
                {
                    Response.Write("1");//可以输出数字 大于0 表示操作成功,也可以直接输出 字符串,客户端将弹出此字符串信息作为提示
                }
                else
                {
                    Response.Write("删除失败!");
                }
            }
            else
            {
                Response.Write("不能删除!");
            }
        }
        if (Request["DelByKeyID"] != null)
        {
            string msg = "";
            DelPROC(int.Parse(Request["WFID"]), int.Parse(Request["DelByKeyID"]), ref msg);
            Response.Write(msg);
        }

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

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

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

            Response.Write("修改用户信息成功");
        }
        Response.End();
    }