protected void btnFind_Click(object sender, EventArgs e) { condObj = new WF_INFO(); if (txtWFCNAME.Value != "") { condObj.Like(WF_INFO.Attribute.WFCNAME, Convert.ToString(txtWFCNAME.Value)); } if (txtSTATUS.Value != "") { condObj.STATUS = Convert.ToString(txtSTATUS.Value); } if (txtUSE_LIMIT.Value != "") { condObj.USE_LIMIT = Convert.ToString(txtUSE_LIMIT.Value); } hidCondition.Value = condObj.ToJson(20); BindList(condObj, 1); }
protected void btnFind_Click(object sender, EventArgs e) { try { condObj = new WF_INFO(); if (txtWFCID.Value != "") { condObj.Like(WF_INFO.Attribute.WFID, Convert.ToInt32(txtWFCID.Value)); } if (txtWFCNAME.Value != "") { condObj.Like(WF_INFO.Attribute.WFCNAME, Convert.ToString(txtWFCNAME.Value)); } if (txtADDTIME.Value != "") { condObj.Like(WF_INFO.Attribute.ADDTIME, Convert.ToDateTime(txtADDTIME.Value)); } if (txtEDITIME.Value != "") { condObj.Like(WF_INFO.Attribute.EDITIME, Convert.ToDateTime(txtEDITIME.Value)); } if (txtSTATUS.Value != "") { condObj.STATUS = Convert.ToString(txtSTATUS.Value); } if (txtUSE_LIMIT.Value != "") { condObj.USE_LIMIT = Convert.ToString(txtUSE_LIMIT.Value); } if (txtNOTE.Value != "") { condObj.Like(WF_INFO.Attribute.NOTE, Convert.ToString(txtNOTE.Value)); } listObj = BLLTable <WF_INFO> .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; }
protected void aspPager_PageChanged(object sender, EventArgs e) { if (hidCondition.Value != "") { condObj = JsonServiceBase.FromJson <WF_INFO>(hidCondition.Value); } BindList(condObj, aspPager.CurrentPageIndex); }
protected void aspPager_PageChanged(object sender, EventArgs e) { if (hidCondition.Value != "") { condObj = JsonServiceBase.FromJson<WF_INFO>(hidCondition.Value); } BindList(condObj, aspPager.CurrentPageIndex); }
protected void Page_Load(object sender, EventArgs e) { title = valObj._ZhName + "��ϸ"; Page.Title = title; if (!IsPostBack) { try { if (!string.IsNullOrEmpty(Request["WFCID"])) { valObj = BLLTable<WF_INFO>.Factory(conn).GetRowData(WF_INFO.Attribute.WFID, Request["WFCID"]); if(valObj==null) return ; txtWFCID.Text = Convert.ToString(valObj.WFID);//Convert.ToInt32 txtWFCNAME.Text = Convert.ToString(valObj.WFCNAME);//Convert.ToString txtADDTIME.Text = (valObj.ADDTIME == DateTime.MinValue) ? "" : valObj.ADDTIME.ToString("yyyy-MM-dd HH:mm"); txtEDITIME.Text = (valObj.EDITIME == DateTime.MinValue) ? "" : valObj.EDITIME.ToString("yyyy-MM-dd HH:mm"); txtSTATUS.Text=valObj.STATUS.ToString(); txtUSE_LIMIT.Text=valObj.USE_LIMIT.ToString(); //txtFORMTB.Text = Convert.ToString(valObj.FORMTB);//Convert.ToString //txtFORMDETAIL.Text = Convert.ToString(valObj.FORMDETAIL);//Convert.ToString txtNOTE.Text = Convert.ToString(valObj.NOTE);//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) { if (!IsPostBack) { WF_INFO cond = new WF_INFO(); cond.STATUS = "1"; List<WF_INFO> lst = BLLTable<WF_INFO>.Factory(conn).Select(new WF_INFO(), cond); for (int i = 0; i < lst.Count; i++) { litWFS.Text += "<li><a href='RecManage.aspx?WFID=" + lst[i].WFID + "' data=\"{key:'wf" + lst[i].WFID + "list'}\" target='recmanage'>" + lst[i].WFCNAME + "</a></li>"; } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { WF_INFO cond = new WF_INFO(); cond.STATUS = "1"; List <WF_INFO> lst = BLLTable <WF_INFO> .Factory(conn).Select(new WF_INFO(), cond); for (int i = 0; i < lst.Count; i++) { litWFS.Text += "<li><a href='RecManage.aspx?WFID=" + lst[i].WFID + "' data=\"{key:'wf" + lst[i].WFID + "list'}\" target='recmanage'>" + lst[i].WFCNAME + "</a></li>"; } } }
int delWFINFO(string wfid, out string msg) { msg = ""; WF_STEP_TPL ccc1 = new WF_STEP_TPL(); ccc1.WFID = int.Parse(wfid); ccc1.STEP_TYPE = 1; if (BLLTable <WF_STEP_TPL> .Exists(ccc1)) { msg = "存在步骤,不能删除!"; return(0); } WF_INFO wf = BLLTable <WF_INFO> .Factory(conn).GetRowData(WF_INFO.Attribute.WFID, wfid); int re = BLLTable <WF_INFO> .Factory(conn).Delete(WF_INFO.Attribute.WFID, wfid); if (re > 0) { BLLTable <WF_PROCESS> .Factory(conn).Delete(WF_PROCESS.Attribute.WFID, wfid); BLLTable <WF_PROCESS_TPL> .Factory(conn).Delete(WF_PROCESS_TPL.Attribute.WFID, wfid); BLLTable <WF_STEP> .Factory(conn).Delete(WF_STEP.Attribute.WFID, wfid); BLLTable <WF_STEP_TPL> .Factory(conn).Delete(WF_STEP_TPL.Attribute.WFID, wfid); BLLTable <WF_CHECKER> .Factory(conn).Delete(WF_CHECKER.Attribute.WFID, wfid); BLLTable <WF_CHECKER_TPL> .Factory(conn).Delete(WF_CHECKER_TPL.Attribute.WFID, wfid); BLLTable <WF_PROCVAR> .Factory(conn).Delete(WF_PROCVAR.Attribute.WFID, wfid); BLLTable <WF_PROCVAR_TPL> .Factory(conn).Delete(WF_PROCVAR_TPL.Attribute.WFID, wfid); BLLTable <WF_STEPATH> .Factory(conn).Delete(WF_STEPATH.Attribute.WFID, wfid); BLLTable <WF_STEPATH_TPL> .Factory(conn).Delete(WF_STEPATH_TPL.Attribute.WFID, wfid); //jinshenjian BLLTable <WF_WFOBJECT> .Factory(conn).Delete(WF_WFOBJECT.Attribute.WFID_SRC, wfid); //jinshenjian WFCOMMON_DAL.DelWFTable(wf.WFID); } return(re); }
protected void btnFind_Click(object sender, EventArgs e) { condObj = new WF_INFO(); if(txtWFCNAME.Value !="" ) condObj.Like(WF_INFO.Attribute.WFCNAME, Convert.ToString(txtWFCNAME.Value)); if(txtSTATUS.Value !="" ) condObj.STATUS = Convert.ToString(txtSTATUS.Value); if(txtUSE_LIMIT.Value !="" ) condObj.USE_LIMIT = Convert.ToString(txtUSE_LIMIT.Value); hidCondition.Value = condObj.ToJson(20); BindList(condObj, 1); }
protected void aspPager_PageChanged(object sender, EventArgs e) { try { if (hidCondition.Value != "") { condObj = JsonServiceBase.FromJson <WF_INFO>(hidCondition.Value); } listObj = BLLTable <WF_INFO> .Factory(conn).SelectByPage(valObj, condObj, aspPager.PageSize, aspPager.CurrentPageIndex, ref recount); repCus.DataSource = listObj; repCus.DataBind(); } catch (Exception ex) { litWarn.Text = ex.Message; } }
protected void aspPager_PageChanged(object sender, EventArgs e) { try { if (hidCondition.Value != "") { condObj = JsonServiceBase.FromJson<WF_INFO>(hidCondition.Value); } listObj = BLLTable<WF_INFO>.Factory(conn).SelectByPage(valObj, condObj, aspPager.PageSize, aspPager.CurrentPageIndex, ref recount); repCus.DataSource = listObj; repCus.DataBind(); } catch (Exception ex) { litWarn.Text = ex.Message; } }
protected void repType_ItemDataBound(object sender, RepeaterItemEventArgs e) { WF_TYPE ttt = (WF_TYPE)e.Item.DataItem; if (ttt != null) { int typeid = ttt.TYPE_ID; WF_INFO ccc = new WF_INFO(); ccc.TYPE_ID = typeid; ccc.STATUS = "1"; Repeater repWF = (Repeater)e.Item.FindControl("repWF"); List<WF_INFO> lst = BLLTable<WF_INFO>.Factory(conn).Select(new WF_INFO(), ccc); repWF.DataSource = lst; repWF.DataBind(); } }
private void BindList(WF_INFO condObj, int curPage) { if (condObj.af_PageByAttributeItem == null)//如果不存在用户定义的分页排序属性,则用主键属性排序 { condObj.af_PageBy(WF_INFO.Attribute.WFID, Order.Desc); } #region//数据权限条件 #endregion listObj = BLLTable <WF_INFO> .Factory(conn).SelectByPage(valObj, condObj, aspPager.PageSize, curPage, ref recount); repList.DataSource = listObj; repList.DataBind(); aspPager.RecordCount = recount; }
protected void repList_ItemDataBound(object sender, RepeaterItemEventArgs e) { try { WF_INFO wf = (WF_INFO)e.Item.DataItem; List <WF_WFOBJECT> lst = BLLTable <WF_WFOBJECT> .Factory(conn).Select(WF_WFOBJECT.Attribute.WFID_SRC, wf.WFID); if (lst != null && lst.Count > 0) { Repeater rrr = (Repeater)e.Item.FindControl("repObject"); rrr.DataSource = lst; rrr.DataBind(); } } catch (Exception ex) { litWarn.Text = ex.Message; } }
protected void repType_ItemDataBound(object sender, RepeaterItemEventArgs e) { WF_TYPE ttt = (WF_TYPE)e.Item.DataItem; if (ttt != null) { int typeid = ttt.TYPE_ID; WF_INFO ccc = new WF_INFO(); ccc.TYPE_ID = typeid; ccc.STATUS = "1"; Repeater repWF = (Repeater)e.Item.FindControl("repWF"); List <WF_INFO> lst = BLLTable <WF_INFO> .Factory(conn).Select(new WF_INFO(), ccc); repWF.DataSource = lst; repWF.DataBind(); } }
protected void btnFind_Click(object sender, EventArgs e) { try { condObj = new WF_INFO(); if(txtWFCID.Value !="" ) condObj.Like(WF_INFO.Attribute.WFID, Convert.ToInt32(txtWFCID.Value)); if(txtWFCNAME.Value !="" ) condObj.Like(WF_INFO.Attribute.WFCNAME, Convert.ToString(txtWFCNAME.Value)); if(txtADDTIME.Value !="" ) condObj.Like(WF_INFO.Attribute.ADDTIME, Convert.ToDateTime(txtADDTIME.Value)); if(txtEDITIME.Value !="" ) condObj.Like(WF_INFO.Attribute.EDITIME, Convert.ToDateTime(txtEDITIME.Value)); if(txtSTATUS.Value !="" ) condObj.STATUS = Convert.ToString(txtSTATUS.Value); if(txtUSE_LIMIT.Value !="" ) condObj.USE_LIMIT = Convert.ToString(txtUSE_LIMIT.Value); if(txtNOTE.Value !="" ) condObj.Like(WF_INFO.Attribute.NOTE, Convert.ToString(txtNOTE.Value)); listObj = BLLTable<WF_INFO>.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; }
private void BindList(WF_INFO condObj, int curPage) { if (condObj.af_PageByAttributeItem == null)//����������û�����ķ�ҳ�������ԣ����������������� condObj.af_PageBy(WF_INFO.Attribute.WFID, Order.Desc); #region//����Ȩ������ #endregion listObj = BLLTable<WF_INFO>.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 + "�༭"; this.Title = title; if (!string.IsNullOrEmpty(Request["KeyID"])) { keyid = Request["KeyID"]; } if (!string.IsNullOrEmpty(Request["WFID"])) { keyid = Request["WFID"]; } if (!IsPostBack) { txtSTATUS.Items.AddRange(FormHelper.GetListItem(WF_INFO.Attribute.STATUS)); txtUSE_LIMIT.Items.AddRange(FormHelper.GetListItem(WF_INFO.Attribute.USE_LIMIT)); this.txtWFCID.Disabled = true; this.txtWFCID.Attributes["class"] = "dis"; try { if (keyid != "") { valObj = BLLTable<WF_INFO>.Factory(conn).GetRowData(WF_INFO.Attribute.WFID, keyid); if (valObj == null) return; //TF_FORM formobj = BLLTable<TF_FORM>.Factory(conn).GetRowData(TF_FORM.Attribute.FORM_ID, valObj.FORM_ID); //if (formobj != null) //{ // //txtFORM_ID.Value = formobj.F_NAME; // //hidFORM_ID.Value = formobj.FORM_ID.ToString(); // //btnSel.Visible = false; // //TF_TABLE tbobj = BLLTable<TF_TABLE>.Factory(conn).GetRowData(TF_TABLE.Attribute.TB_ID, formobj.TB_ID); // //if (tbobj != null) // //{ // if (string.IsNullOrEmpty(valObj.FORM_TB)) // { // litWarn.Text = "������ʱ��δ������"; // li_NewWFTB.Visible = true; // btnOK.Enabled = false; // } // //} //} txtWFCID.Value = Convert.ToString(valObj.WFID);//Convert.ToInt32 txtWFCNAME.Value = Convert.ToString(valObj.WFCNAME);//Convert.ToString txtSTATUS.Value = valObj.STATUS.ToString(); txtUSE_LIMIT.Value = valObj.USE_LIMIT.ToString(); txtNOTE.Value = Convert.ToString(valObj.NOTE);//Convert.ToString WF_TYPE tpObj = BLLTable<WF_TYPE>.Factory(conn).GetRowData(WF_TYPE.Attribute.TYPE_ID, valObj.TYPE_ID); if (tpObj != null) { txtTYPE_ID.Value = tpObj.TYPE_NAME; hidTYPE_ID.Value = tpObj.TYPE_ID.ToString(); } //txtFORM_ID.Disabled = true; } else { if (txtSTATUS.Items.Count > 1) { txtSTATUS.SelectedIndex = 1; } if (txtUSE_LIMIT.Items.Count > 1) { txtUSE_LIMIT.SelectedIndex = 1;//AgileFrame.Core. } dlStatus.Visible = false; } } catch (Exception ex) { litWarn.Text = ex.Message; } } }
protected void Page_Load(object sender, EventArgs e) { //在列表里点击删除按钮,通过AJAX执行这里的后台代码,删除一条记录 if (Request["DelWFCID"] != null) { //WF_INFO wf = BLLTable<WF_INFO>.Factory(conn).GetRowData(WF_INFO.Attribute.WFID, Request["DelWFCID"]); string msg = ""; int re = delWFINFO(Request["DelWFCID"], out msg);// BLLTable<WF_INFO>.Factory(conn).Delete(WF_INFO.Attribute.WFID, Request["DelWFCID"]); if (re > 0) { Response.Write("1");//可以输出数字 大于0 表示操作成功,也可以直接输出 字符串,客户端将弹出此字符串信息作为提示 } else { Response.Write("删除失败!"); } } if (Request["DelByKeyID"] != null) { string msg = "删除工作流成功"; int re = delWFINFO(Request["DelByKeyID"], out msg); if (re > 0) { Response.Write("{re:1,msg:'" + msg + "'}");//可以输出数字 大于0 表示操作成功,也可以直接输出 字符串,客户端将弹出此字符串信息作为提示 } else { Response.Write("{re:0,msg:'" + msg + "'}"); } } //在列表顶部点击删除按钮,通过AJAX执行这里的后台代码,删除多条记录 if (Request["DelKeyIDS"] != null) { string[] arr = StringHelper.GetStringArray(Request["DelKeyIDS"], ','); int re = 0; string msg = "删除工作流成功"; for (int i = 0; i < arr.Length; i++) { string mmm = ""; re += delWFINFO(arr[i], out mmm); msg += mmm; } //WF_INFO cond = new WF_INFO(); //cond.In(WF_INFO.Attribute.WFID, Request["DelKeyIDS"]); //int re = BLLTable<WF_INFO>.Factory(conn).Delete(cond); if (re > 0) { //WF_INFO wf = BLLTable<WF_INFO>.Factory(conn).GetRowData(WF_INFO.Attribute.WFID, Request["DelWFCID"]); Response.Write("1");//可以输出数字 大于0 表示操作成功,也可以直接输出 字符串,客户端将弹出此字符串信息作为提示 } else { Response.Write("删除失败!"); } } //在用户详细信息查看编辑页面,点保存时,通过AJAX执行这里的后台代码,实现部门字段的更新 if (Request["saveInfo"] != null) { WF_INFO val = new WF_INFO(); val.WFID = 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_INFO> .Factory(conn).Update(val, WF_INFO.Attribute.WFID); Response.Write("修改用户信息成功"); } Response.End(); }
protected void Page_Load(object sender, EventArgs e) { title = valObj._ZhName + "详细"; Page.Title = title; if (!IsPostBack) { try { if (!string.IsNullOrEmpty(Request["WFCID"])) { valObj = BLLTable <WF_INFO> .Factory(conn).GetRowData(WF_INFO.Attribute.WFID, Request["WFCID"]); if (valObj == null) { return; } txtWFCID.Text = Convert.ToString(valObj.WFID);//Convert.ToInt32 txtWFCNAME.Text = Convert.ToString(valObj.WFCNAME);//Convert.ToString txtADDTIME.Text = (valObj.ADDTIME == DateTime.MinValue) ? "" : valObj.ADDTIME.ToString("yyyy-MM-dd HH:mm"); txtEDITIME.Text = (valObj.EDITIME == DateTime.MinValue) ? "" : valObj.EDITIME.ToString("yyyy-MM-dd HH:mm"); txtSTATUS.Text = valObj.STATUS.ToString(); txtUSE_LIMIT.Text = valObj.USE_LIMIT.ToString(); //txtFORMTB.Text = Convert.ToString(valObj.FORMTB);//Convert.ToString //txtFORMDETAIL.Text = Convert.ToString(valObj.FORMDETAIL);//Convert.ToString txtNOTE.Text = Convert.ToString(valObj.NOTE);//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) { //���б�����ɾ����ť��ͨ��AJAXִ������ĺ�̨���룬ɾ��һ����¼ if (Request["DelWFCID"] != null) { //WF_INFO wf = BLLTable<WF_INFO>.Factory(conn).GetRowData(WF_INFO.Attribute.WFID, Request["DelWFCID"]); string msg = ""; int re = delWFINFO(Request["DelWFCID"],out msg);// BLLTable<WF_INFO>.Factory(conn).Delete(WF_INFO.Attribute.WFID, Request["DelWFCID"]); if (re > 0) { Response.Write("1");//����������� ����0 ��ʾ�����ɹ���Ҳ����ֱ����� �ַ������ͻ��˽��������ַ�����Ϣ��Ϊ��ʾ } else { Response.Write("ɾ��ʧ�ܣ�"); } } if (Request["DelByKeyID"] != null) { string msg = "ɾ���������ɹ�"; int re = delWFINFO(Request["DelByKeyID"],out msg); if (re > 0) { Response.Write("{re:1,msg:'" + msg + "'}");//����������� ����0 ��ʾ�����ɹ���Ҳ����ֱ����� �ַ������ͻ��˽��������ַ�����Ϣ��Ϊ��ʾ } else { Response.Write("{re:0,msg:'" + msg + "'}"); } } //���б�������ɾ����ť��ͨ��AJAXִ������ĺ�̨���룬ɾ��������¼ if (Request["DelKeyIDS"] != null) { string[] arr = StringHelper.GetStringArray(Request["DelKeyIDS"], ','); int re = 0; string msg = "ɾ���������ɹ�"; for (int i = 0; i < arr.Length; i++) { string mmm = ""; re += delWFINFO(arr[i], out mmm); msg += mmm; } //WF_INFO cond = new WF_INFO(); //cond.In(WF_INFO.Attribute.WFID, Request["DelKeyIDS"]); //int re = BLLTable<WF_INFO>.Factory(conn).Delete(cond); if (re > 0) { //WF_INFO wf = BLLTable<WF_INFO>.Factory(conn).GetRowData(WF_INFO.Attribute.WFID, Request["DelWFCID"]); Response.Write("1");//����������� ����0 ��ʾ�����ɹ���Ҳ����ֱ����� �ַ������ͻ��˽��������ַ�����Ϣ��Ϊ��ʾ } else { Response.Write("ɾ��ʧ�ܣ�"); } } //���û���ϸ��Ϣ�鿴�༭ҳ�棬�㱣��ʱ��ͨ��AJAXִ������ĺ�̨���룬ʵ�ֲ����ֶεĸ��� if (Request["saveInfo"] != null) { WF_INFO val = new WF_INFO(); val.WFID = 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_INFO>.Factory(conn).Update(val, WF_INFO.Attribute.WFID); Response.Write("���û���Ϣ�ɹ�"); } Response.End(); }
protected void Page_Load(object sender, EventArgs e) { title = valObj._ZhName + "管理 "; if (!string.IsNullOrEmpty(Request["WFID"])) { wfid = int.Parse(Request["WFID"]); } else { if (!string.IsNullOrEmpty(Request["PROCID"])) { procid = int.Parse(Request["PROCID"]); WF_PROCESS_TPL proc = BLLTable <WF_PROCESS_TPL> .Factory(conn).GetRowData(WF_PROCESS_TPL.Attribute.PROCID, procid); wfid = proc.WFID; title += proc.PROC_NAME + "-"; } else { Response.Write("非法连接!"); Response.End(); } } if (!string.IsNullOrEmpty(Request["PROCID"])) { procid = int.Parse(Request["PROCID"]); } else { List <WF_PROCESS_TPL> lstProc = BLLTable <WF_PROCESS_TPL> .Factory(conn).Select(WF_PROCESS_TPL.Attribute.WFID, wfid); if (lstProc.Count > 0) { procid = lstProc[0].PROCID; title += lstProc[0].PROC_NAME + "-"; } else { ScriptHelper.AlertAndGo(Page, "此流程未配置过程!", "../PROCESS/PROCESSManage.aspx?WFID=" + wfid); } } if (!IsPostBack) { #region//数据初始化 WF_STEP_TPL rule_b = new WF_STEP_TPL(); rule_b.WFID = wfid; rule_b.PROCID = procid; rule_b.STEP_TYPE = 0; WF_STEP_TPL bObj = BLLTable <WF_STEP_TPL> .Factory(conn).GetRowData(new WF_STEP_TPL(), rule_b); if (bObj == null) { rule_b.CONDITION = ""; rule_b.FORMULAR = ""; rule_b.STEP_NAME = "开始"; BLLTable <WF_STEP_TPL> .Factory(conn).Insert(rule_b, WF_STEP_TPL.Attribute.STEP_ID); bObj = rule_b; } litB.Text = bObj.STEP_NAME; beginID = bObj.STEP_ID; WF_STEP_TPL rule_e = new WF_STEP_TPL(); rule_e.WFID = wfid; rule_e.PROCID = procid; rule_e.STEP_TYPE = 3; WF_STEP_TPL eObj = BLLTable <WF_STEP_TPL> .Factory(conn).GetRowData(new WF_STEP_TPL(), rule_e); if (eObj == null) { rule_e.CONDITION = ""; rule_e.FORMULAR = ""; rule_e.STEP_NAME = "结束"; BLLTable <WF_STEP_TPL> .Factory(conn).Insert(rule_e, WF_STEP_TPL.Attribute.STEP_ID); eObj = rule_e; } litE.Text = eObj.STEP_NAME; endID = eObj.STEP_ID; WF_INFO wf = BLLTable <WF_INFO> .Factory(conn).GetRowData(WF_INFO.Attribute.WFID, wfid); if (wf.STATUS != "1") { btnApplyTo.Enabled = false; btnApplyProc.Disabled = true; } #endregion Dictionary <int, WF_STEP_TPL> noUseSTep = new Dictionary <int, WF_STEP_TPL>(); //流程图形设计器: litStepMap.Text = WFAdmin.ShowStepPathMap(wfid, procid, out noUseSTep); if (noUseSTep.Count > 0) { StringBuilder sbMap = new StringBuilder(); foreach (KeyValuePair <int, WF_STEP_TPL> val in noUseSTep) { string data = "{id:'" + val.Value.STEP_ID + "',name:'" + val.Value.STEP_NAME + "',type:'" + val.Value.STEP_TYPE + "'}"; sbMap.Append("<div class='step type-" + val.Value.STEP_TYPE + "' data=\"" + data + "\"><b>" + val.Value.STEP_NAME + "</b>"); sbMap.Append("</div>"); } litSteps.Text = sbMap.ToString(); } } Page.Title = title; }
protected void Page_Load(object sender, EventArgs e) { title = "申请单列表"; Page.Title = title; if (!string.IsNullOrEmpty(Request["WFID"])) { wfid = int.Parse(Request["WFID"]); } appPath = WebHelper.GetAppPath(); if (!IsPostBack) { staff_id = userBase.GetStaff().STAFF_ID; if (wfid > 0) { title = BLLTable <WF_INFO> .Factory(conn).GetOneValue(WF_INFO.Attribute.WFID, wfid, WF_INFO.Attribute.WFCNAME); } //如果没存在这个员工怎么处理,staff_id == 0 //////////// WF_INFO cond = new WF_INFO(); cond.STATUS = "1"; List <WF_INFO> lst = BLLTable <WF_INFO> .Factory(conn).Select(new WF_INFO(), cond); WF_TYPE condType = new WF_TYPE(); condType.STATUS = 1; List <WF_TYPE> lstType = BLLTable <WF_TYPE> .Factory(conn).Select(new WF_TYPE(), condType); string url = Page.Request.Url.AbsoluteUri; int iii = url.IndexOf("?"); if (iii == -1) { url = "FORMList.aspx?"; } else { url = "FORMList.aspx" + url.Substring(iii); } for (int i = 0; i < lstType.Count; i++) { var lll = lst.Where(l => l._TYPE_ID == lstType[i]._TYPE_ID); litMenu.Text += "<li><a>" + lstType[i].TYPE_NAME + "</a><ul>"; foreach (WF_INFO l in lll) { string purl = url + "&WFID=" + l.WFID; litMenu.Text += "<li><a href='" + purl + "' data=\"{key:'wf" + l.WFID + "mylist'}\">" + l.WFCNAME + "管理</a></li>"; } litMenu.Text += "</ul></li>"; } //////////// ViewState["STAFF_ID"] = staff_id; #region //默认属性初始化 aspPager.CurrentPageIndex = 1; aspPager.ShowInputBox = AgileFrame.Core.WebSystem.ShowInputBox.Auto; //WebCtrls. txtPageSize.Value = "30"; aspPager.PageSize = 30; #endregion #region//数据初始化 txtSTATUS.Items.AddRange(FormHelper.GetListItem(WF_FORMBASE.Attribute.STATUS)); #endregion BindList(condObj, 1); } }
protected void btnOK_Click(object sender, EventArgs e) { //if (hidFORM_ID.Value.Trim() == "") //{ // litWarn.Text = "��ѡ���Ӧ�ı��"; //AgileFrame.Core.ScriptHelper.Alert(Page, "��ѡ���Ӧ�ı����"); // return; //} //else { // TF_F_COLUMN ccc = new TF_F_COLUMN(); // ccc.FORM_ID = int.Parse(hidFORM_ID.Value); // if (BLLTable<TF_F_COLUMN>.Count(ccc) <= 0) // { // litWarn.Text = "��ѡ��ı����δ������Ŀ�ֶΣ�����������Ŀ��"; //AgileFrame.Core.ScriptHelper.Alert(Page, "��ѡ���Ӧ�ı����"); // return; // } //} try { WF_INFO valObj = new WF_INFO(); if(txtWFCID.Value !="" ) valObj.WFID = Convert.ToInt32(txtWFCID.Value); if(txtWFCNAME.Value !="" ) valObj.WFCNAME = Convert.ToString(txtWFCNAME.Value); if(txtUSE_LIMIT.Value !="" ) valObj.USE_LIMIT = Convert.ToString(txtUSE_LIMIT.Value); if(txtNOTE.Value !="" ) valObj.NOTE = Convert.ToString(txtNOTE.Value); valObj.FORM_ID = 0;// int.Parse(hidFORM_ID.Value); valObj.EDITIME = DateTime.Now; valObj.TYPE_ID = 1; if (!string.IsNullOrEmpty(hidTYPE_ID.Value)) { valObj.TYPE_ID = int.Parse(hidTYPE_ID.Value); } if (keyid != "") { if (txtSTATUS.Value != "") valObj.STATUS = Convert.ToString(txtSTATUS.Value); valObj.WFID = Convert.ToInt32(keyid); count = BLLTable<WF_INFO>.Factory(conn).Update(valObj, WF_INFO.Attribute.WFID); keyid = valObj.WFID.ToString(); //�������̱����ϵ��״̬ WF_WFOBJECT objwf = new WF_WFOBJECT(); if (txtSTATUS.Value != "") objwf.STATUS = Convert.ToInt32(txtSTATUS.Value); objwf.WFID_SRC = valObj.WFID; int intRet = BLLTable<WF_WFOBJECT>.Factory(conn).Update(objwf, WF_WFOBJECT.Attribute.WFID_SRC); } else { valObj.FILE_TB = ""; valObj.FILE_TBDETAIL = ""; valObj.FORM_TB = ""; valObj.FORM_TBDETAIL = ""; valObj.STATUS = "0"; valObj.ADDTIME = DateTime.Now; count = BLLTable<WF_INFO>.Factory(conn).Insert(valObj, WF_INFO.Attribute.WFID); keyid = valObj.WFID.ToString(); if (count > 0) { WF_PROCESS_TPL procObj = new WF_PROCESS_TPL(); procObj.WFID = valObj.WFID; procObj.PROC_NAME = valObj.WFCNAME + "Ĭ�Ϲ���"; procObj.STATUS = "1";// Convert.ToString(txtSTATUS.Value); procObj.CONDITION = ""; procObj.FORMULAR = ""; procObj.NOTE = ""; procObj.EDITIME = DateTime.Now; procObj.PROCID = Convert.ToInt32(keyid); procObj.GUID = "P" + DateTime.Now.ToString("yyyyMMddHHmmss"); procObj.ADDTIME = DateTime.Now; count = BLLTable<WF_PROCESS_TPL>.Factory(conn).Insert(procObj, WF_PROCESS_TPL.Attribute.PROCID); //WFCOMMON_DAL.CreateWFTByForm(valObj.WFID, valObj.FORM_ID);//����������ر�������̻�����Ϣ�������ݱ���ص��ֶ� } } if (count > 0) { Button btn = (Button)sender; if (btn.ID.IndexOf("btnOK") != -1) { ScriptManager.RegisterStartupScript(Page, this.GetType(), "goto", "if (window.opener){window.opener.location.reload();}window.close();", true); } else { txtWFCNAME.Value = ""; txtSTATUS.Value = ""; txtUSE_LIMIT.Value = ""; txtNOTE.Value = ""; } } } catch (Exception ex) { litWarn.Text = ex.Message; } }
protected void Page_Load(object sender, EventArgs e) { title = "申请单列表"; Page.Title = title; if (!string.IsNullOrEmpty(Request["WFID"])) { wf_obj_id = int.Parse(Request["WFID"]); wfbll = new WFOBJECT_BLL(wf_obj_id); if (wfbll.Base != null) { bllform = wfbll.FORM_BLL; wfobj = wfbll.Base; } else { return; } } else { return; } appPath = WebHelper.GetAppPath(); if (!IsPostBack) { staff_id = userBase.GetStaff().STAFF_ID; title = wfbll.Base._WF_OBJ_NAME; //////////// WF_INFO cond = new WF_INFO(); cond.STATUS = "1"; List <WF_INFO> lst = BLLTable <WF_INFO> .Factory(conn).Select(new WF_INFO(), cond); List <WF_TYPE> lstType = BLLTable <WF_TYPE> .Factory(conn).Select(new WF_TYPE(), new WF_TYPE()); for (int i = 0; i < lstType.Count; i++) { var lll = lst.Where(l => l._TYPE_ID == lstType[i]._TYPE_ID); litMenu.Text += "<li><a>" + lstType[i].TYPE_NAME + "</a><ul>"; foreach (WF_INFO l in lll) { litMenu.Text += "<li><a href='" + appPath + "WF/FORMList.aspx?mine=1&WFID=" + l.WFID + "' data=\"{key:'wf" + l.WFID + "mylist'}\">" + l.WFCNAME + "管理</a></li>"; } litMenu.Text += "</ul></li>"; } //////////// //如果没存在这个员工怎么处理,staff_id == 0 ViewState["STAFF_ID"] = staff_id; #region //默认属性初始化 aspPager.CurrentPageIndex = 1; aspPager.ShowInputBox = AgileFrame.Core.WebSystem.ShowInputBox.Auto; //.WebCtrls txtPageSize.Value = "30"; aspPager.PageSize = 30; #endregion #region//数据初始化 //txtSTATUS.Items.AddRange(FormHelper.GetListItem(WF_FORMBASE.Attribute.STATUS)); #endregion BindList(1); } }
protected void Page_Load(object sender, EventArgs e) { title = valObj._ZhName + "编辑"; this.Title = title; if (!string.IsNullOrEmpty(Request["KeyID"])) { keyid = Request["KeyID"]; } if (!string.IsNullOrEmpty(Request["WFID"])) { keyid = Request["WFID"]; } if (!IsPostBack) { txtSTATUS.Items.AddRange(FormHelper.GetListItem(WF_INFO.Attribute.STATUS)); txtUSE_LIMIT.Items.AddRange(FormHelper.GetListItem(WF_INFO.Attribute.USE_LIMIT)); this.txtWFCID.Disabled = true; this.txtWFCID.Attributes["class"] = "dis"; try { if (keyid != "") { valObj = BLLTable <WF_INFO> .Factory(conn).GetRowData(WF_INFO.Attribute.WFID, keyid); if (valObj == null) { return; } //TF_FORM formobj = BLLTable<TF_FORM>.Factory(conn).GetRowData(TF_FORM.Attribute.FORM_ID, valObj.FORM_ID); //if (formobj != null) //{ // //txtFORM_ID.Value = formobj.F_NAME; // //hidFORM_ID.Value = formobj.FORM_ID.ToString(); // //btnSel.Visible = false; // //TF_TABLE tbobj = BLLTable<TF_TABLE>.Factory(conn).GetRowData(TF_TABLE.Attribute.TB_ID, formobj.TB_ID); // //if (tbobj != null) // //{ // if (string.IsNullOrEmpty(valObj.FORM_TB)) // { // litWarn.Text = "流程临时表未创建!"; // li_NewWFTB.Visible = true; // btnOK.Enabled = false; // } // //} //} txtWFCID.Value = Convert.ToString(valObj.WFID); //Convert.ToInt32 txtWFCNAME.Value = Convert.ToString(valObj.WFCNAME); //Convert.ToString txtSTATUS.Value = valObj.STATUS.ToString(); txtUSE_LIMIT.Value = valObj.USE_LIMIT.ToString(); txtNOTE.Value = Convert.ToString(valObj.NOTE);//Convert.ToString WF_TYPE tpObj = BLLTable <WF_TYPE> .Factory(conn).GetRowData(WF_TYPE.Attribute.TYPE_ID, valObj.TYPE_ID); if (tpObj != null) { txtTYPE_ID.Value = tpObj.TYPE_NAME; hidTYPE_ID.Value = tpObj.TYPE_ID.ToString(); } //txtFORM_ID.Disabled = true; } else { if (txtSTATUS.Items.Count > 1) { txtSTATUS.SelectedIndex = 1; } if (txtUSE_LIMIT.Items.Count > 1) { txtUSE_LIMIT.SelectedIndex = 1;//AgileFrame.Core. } dlStatus.Visible = false; } } catch (Exception ex) { litWarn.Text = ex.Message; } } }
protected void btnOK_Click(object sender, EventArgs e) { //if (hidFORM_ID.Value.Trim() == "") //{ // litWarn.Text = "请选择对应的表单"; //AgileFrame.Core.ScriptHelper.Alert(Page, "请选择对应的表单!"); // return; //} //else { // TF_F_COLUMN ccc = new TF_F_COLUMN(); // ccc.FORM_ID = int.Parse(hidFORM_ID.Value); // if (BLLTable<TF_F_COLUMN>.Count(ccc) <= 0) // { // litWarn.Text = "您选择的表单还未配置栏目字段!请先配置栏目。"; //AgileFrame.Core.ScriptHelper.Alert(Page, "请选择对应的表单!"); // return; // } //} try { WF_INFO valObj = new WF_INFO(); if (txtWFCID.Value != "") { valObj.WFID = Convert.ToInt32(txtWFCID.Value); } if (txtWFCNAME.Value != "") { valObj.WFCNAME = Convert.ToString(txtWFCNAME.Value); } if (txtUSE_LIMIT.Value != "") { valObj.USE_LIMIT = Convert.ToString(txtUSE_LIMIT.Value); } if (txtNOTE.Value != "") { valObj.NOTE = Convert.ToString(txtNOTE.Value); } valObj.FORM_ID = 0;// int.Parse(hidFORM_ID.Value); valObj.EDITIME = DateTime.Now; valObj.TYPE_ID = 1; if (!string.IsNullOrEmpty(hidTYPE_ID.Value)) { valObj.TYPE_ID = int.Parse(hidTYPE_ID.Value); } if (keyid != "") { if (txtSTATUS.Value != "") { valObj.STATUS = Convert.ToString(txtSTATUS.Value); } valObj.WFID = Convert.ToInt32(keyid); count = BLLTable <WF_INFO> .Factory(conn).Update(valObj, WF_INFO.Attribute.WFID); keyid = valObj.WFID.ToString(); //更改流程表单关系表状态 WF_WFOBJECT objwf = new WF_WFOBJECT(); if (txtSTATUS.Value != "") { objwf.STATUS = Convert.ToInt32(txtSTATUS.Value); } objwf.WFID_SRC = valObj.WFID; int intRet = BLLTable <WF_WFOBJECT> .Factory(conn).Update(objwf, WF_WFOBJECT.Attribute.WFID_SRC); } else { valObj.FILE_TB = ""; valObj.FILE_TBDETAIL = ""; valObj.FORM_TB = ""; valObj.FORM_TBDETAIL = ""; valObj.STATUS = "0"; valObj.ADDTIME = DateTime.Now; count = BLLTable <WF_INFO> .Factory(conn).Insert(valObj, WF_INFO.Attribute.WFID); keyid = valObj.WFID.ToString(); if (count > 0) { WF_PROCESS_TPL procObj = new WF_PROCESS_TPL(); procObj.WFID = valObj.WFID; procObj.PROC_NAME = valObj.WFCNAME + "默认过程"; procObj.STATUS = "1";// Convert.ToString(txtSTATUS.Value); procObj.CONDITION = ""; procObj.FORMULAR = ""; procObj.NOTE = ""; procObj.EDITIME = DateTime.Now; procObj.PROCID = Convert.ToInt32(keyid); procObj.GUID = "P" + DateTime.Now.ToString("yyyyMMddHHmmss"); procObj.ADDTIME = DateTime.Now; count = BLLTable <WF_PROCESS_TPL> .Factory(conn).Insert(procObj, WF_PROCESS_TPL.Attribute.PROCID); //WFCOMMON_DAL.CreateWFTByForm(valObj.WFID, valObj.FORM_ID);//创建流程相关表,修改流程基本信息中与数据表相关的字段 } } if (count > 0) { Button btn = (Button)sender; if (btn.ID.IndexOf("btnOK") != -1) { ScriptManager.RegisterStartupScript(Page, this.GetType(), "goto", "if (window.opener){window.opener.location.reload();}window.close();", true); } else { txtWFCNAME.Value = ""; txtSTATUS.Value = ""; txtUSE_LIMIT.Value = ""; txtNOTE.Value = ""; } } } catch (Exception ex) { litWarn.Text = ex.Message; } }
protected void Page_Load(object sender, EventArgs e) { title ="���뵥�б�"; Page.Title = title; if (!string.IsNullOrEmpty(Request["WFID"])) { wf_obj_id = int.Parse(Request["WFID"]); wfbll = new WFOBJECT_BLL(wf_obj_id); if (wfbll.Base != null) { bllform = wfbll.FORM_BLL; wfobj = wfbll.Base; } else { return; } } else { return; } appPath = WebHelper.GetAppPath(); if (!IsPostBack) { staff_id = userBase.GetStaff().STAFF_ID; title = wfbll.Base._WF_OBJ_NAME; //////////// WF_INFO cond = new WF_INFO(); cond.STATUS = "1"; List<WF_INFO> lst = BLLTable<WF_INFO>.Factory(conn).Select(new WF_INFO(), cond); List<WF_TYPE> lstType = BLLTable<WF_TYPE>.Factory(conn).Select(new WF_TYPE(), new WF_TYPE()); for (int i = 0; i < lstType.Count; i++) { var lll = lst.Where(l => l._TYPE_ID == lstType[i]._TYPE_ID); litMenu.Text += "<li><a>" + lstType[i].TYPE_NAME + "</a><ul>"; foreach (WF_INFO l in lll) { litMenu.Text += "<li><a href='" + appPath + "WF/FORMList.aspx?mine=1&WFID=" + l.WFID + "' data=\"{key:'wf" + l.WFID + "mylist'}\">" + l.WFCNAME + "����</a></li>"; } litMenu.Text += "</ul></li>"; } //////////// //���û�������Ա����ô�����staff_id == 0 ViewState["STAFF_ID"] = staff_id; #region//Ĭ�����Գ�ʼ�� aspPager.CurrentPageIndex = 1; aspPager.ShowInputBox = AgileFrame.Core.WebSystem.ShowInputBox.Auto;//.WebCtrls txtPageSize.Value = "30"; aspPager.PageSize = 30; #endregion #region//���ݳ�ʼ�� //txtSTATUS.Items.AddRange(FormHelper.GetListItem(WF_FORMBASE.Attribute.STATUS)); #endregion BindList(1); } }
protected void Page_Load(object sender, EventArgs e) { title ="���뵥�б�"; Page.Title = title; if (!string.IsNullOrEmpty(Request["WFID"])) { wfid = int.Parse(Request["WFID"]); } appPath = WebHelper.GetAppPath(); if (!IsPostBack) { staff_id = userBase.GetStaff().STAFF_ID; if (wfid > 0) { title = BLLTable<WF_INFO>.Factory(conn).GetOneValue(WF_INFO.Attribute.WFID, wfid, WF_INFO.Attribute.WFCNAME); } //���û�������Ա����ô�����staff_id == 0 //////////// WF_INFO cond = new WF_INFO(); cond.STATUS = "1"; List<WF_INFO> lst = BLLTable<WF_INFO>.Factory(conn).Select(new WF_INFO(), cond); WF_TYPE condType = new WF_TYPE(); condType.STATUS = 1; List<WF_TYPE> lstType = BLLTable<WF_TYPE>.Factory(conn).Select(new WF_TYPE(), condType); string url = Page.Request.Url.AbsoluteUri; int iii = url.IndexOf("?"); if (iii == -1) { url = "FORMList.aspx?"; } else { url = "FORMList.aspx" + url.Substring(iii); } for (int i = 0; i < lstType.Count; i++) { var lll = lst.Where(l => l._TYPE_ID == lstType[i]._TYPE_ID); litMenu.Text += "<li><a>" + lstType[i].TYPE_NAME + "</a><ul>"; foreach (WF_INFO l in lll) { string purl = url + "&WFID="+l.WFID; litMenu.Text += "<li><a href='" + purl + "' data=\"{key:'wf" + l.WFID + "mylist'}\">" + l.WFCNAME + "����</a></li>"; } litMenu.Text += "</ul></li>"; } //////////// ViewState["STAFF_ID"] = staff_id; #region//Ĭ�����Գ�ʼ�� aspPager.CurrentPageIndex = 1; aspPager.ShowInputBox = AgileFrame.Core.WebSystem.ShowInputBox.Auto;//WebCtrls. txtPageSize.Value = "30"; aspPager.PageSize = 30; #endregion #region//���ݳ�ʼ�� txtSTATUS.Items.AddRange(FormHelper.GetListItem(WF_FORMBASE.Attribute.STATUS)); #endregion BindList(condObj, 1); } }