protected void btnFind_Click(object sender, EventArgs e) { try { condObj = new WF_TYPE(); if (txtTYPE_NAME.Value != "") { condObj.Like(WF_TYPE.Attribute.TYPE_NAME, Convert.ToString(txtTYPE_NAME.Value)); } if (txtCREATER.Value != "") { condObj.Like(WF_TYPE.Attribute.CREATER, Convert.ToString(txtCREATER.Value)); } listObj = BLLTable <WF_TYPE> .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_TYPE>(hidCondition.Value); } BindList(condObj, aspPager.CurrentPageIndex); }
protected void aspPager_PageChanged(object sender, EventArgs e) { if (hidCondition.Value != "") { condObj = JsonServiceBase.FromJson <WF_TYPE>(hidCondition.Value); } BindList(condObj, aspPager.CurrentPageIndex); }
protected void Page_Load(object sender, EventArgs e) { //在列表里点击删除按钮,通过AJAX执行这里的后台代码,删除一条记录 if (Request["DelTYPE_ID"] != null) { int re = BLLTable <WF_TYPE> .Factory(conn).Delete(WF_TYPE.Attribute.TYPE_ID, Request["DelTYPE_ID"]); if (re > 0) { Response.Write("1");//可以输出数字 大于0 表示操作成功,也可以直接输出 字符串,客户端将弹出此字符串信息作为提示 } else { Response.Write("删除失败!"); } } //在列表顶部点击删除按钮,通过AJAX执行这里的后台代码,删除多条记录 if (Request["DelKeyIDS"] != null) { WF_TYPE cond = new WF_TYPE(); cond.In(WF_TYPE.Attribute.TYPE_ID, Request["DelKeyIDS"]); int re = BLLTable <WF_TYPE> .Factory(conn).Delete(cond); if (re > 0) { Response.Write("1");//可以输出数字 大于0 表示操作成功,也可以直接输出 字符串,客户端将弹出此字符串信息作为提示 } else { Response.Write("删除失败!"); } } //在用户详细信息查看编辑页面,点保存时,通过AJAX执行这里的后台代码,实现部门字段的更新 if (Request["saveInfo"] != null) { WF_TYPE val = new WF_TYPE(); val.TYPE_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 <WF_TYPE> .Factory(conn).Update(val, WF_TYPE.Attribute.TYPE_ID); Response.Write("修改用户信息成功"); } Response.End(); }
protected void Page_Load(object sender, EventArgs e) { //���б�����ɾ����ť��ͨ��AJAXִ������ĺ�̨���룬ɾ��һ����¼ if (Request["DelTYPE_ID"] != null) { int re = BLLTable<WF_TYPE>.Factory(conn).Delete(WF_TYPE.Attribute.TYPE_ID, Request["DelTYPE_ID"]); if (re > 0) { Response.Write("1");//����������� ����0 ��ʾ�����ɹ���Ҳ����ֱ����� �ַ������ͻ��˽��������ַ�����Ϣ��Ϊ��ʾ } else { Response.Write("ɾ��ʧ�ܣ�"); } } //���б�������ɾ����ť��ͨ��AJAXִ������ĺ�̨���룬ɾ��������¼ if (Request["DelKeyIDS"] != null) { WF_TYPE cond = new WF_TYPE(); cond.In(WF_TYPE.Attribute.TYPE_ID, Request["DelKeyIDS"]); int re = BLLTable<WF_TYPE>.Factory(conn).Delete(cond); if (re > 0) { Response.Write("1");//����������� ����0 ��ʾ�����ɹ���Ҳ����ֱ����� �ַ������ͻ��˽��������ַ�����Ϣ��Ϊ��ʾ } else { Response.Write("ɾ��ʧ�ܣ�"); } } //���û���ϸ��Ϣ�鿴�༭ҳ�棬�㱣��ʱ��ͨ��AJAXִ������ĺ�̨���룬ʵ�ֲ����ֶεĸ��� if (Request["saveInfo"] != null) { WF_TYPE val = new WF_TYPE(); val.TYPE_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<WF_TYPE>.Factory(conn).Update(val, WF_TYPE.Attribute.TYPE_ID); Response.Write("���û���Ϣ�ɹ�"); } Response.End(); }
protected void btnFind_Click(object sender, EventArgs e) { condObj = new WF_TYPE(); if(txtTYPE_NAME.Value !="" ) condObj.Like(WF_TYPE.Attribute.TYPE_NAME, Convert.ToString(txtTYPE_NAME.Value)); if(txtCREATER.Value !="" ) condObj.Like(WF_TYPE.Attribute.CREATER, Convert.ToString(txtCREATER.Value)); hidCondition.Value = condObj.ToJson(20); BindList(condObj, 1); }
private void BindList(WF_TYPE condObj, int curPage) { if (condObj.af_PageByAttributeItem == null)//����������û�����ķ�ҳ�������ԣ����������������� condObj.af_PageBy(WF_TYPE.Attribute.TYPE_ID, Order.Desc); #region//����Ȩ������ #endregion listObj = BLLTable<WF_TYPE>.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 + "±à¼"; Page.Title = title; if (!string.IsNullOrEmpty(Request["TYPE_ID"])) { keyid = Request["TYPE_ID"]; } if (!string.IsNullOrEmpty(Request["KeyID"])) { keyid = Request["KeyID"]; } if (!IsPostBack) { txtSTATUS.Items.AddRange(FormHelper.GetListItem(WF_INFO.Attribute.STATUS)); txtCREATE_TIME.Value = (DateTime.Now).ToString("yyyy-MM-dd"); txtCREATER.Value = userBase.StaffName; try { if (keyid != "") { valObj = BLLTable <WF_TYPE> .Factory(conn).GetRowData(WF_TYPE.Attribute.TYPE_ID, keyid); if (valObj == null) { return; } txtSTATUS.Value = valObj.STATUS.ToString(); txtTYPE_ID.Value = Convert.ToString(valObj.TYPE_ID); //Convert.ToInt32 txtTYPE_NAME.Value = Convert.ToString(valObj.TYPE_NAME); //Convert.ToString txtCREATER.Value = Convert.ToString(valObj.CREATER); //Convert.ToString txtCREATE_TIME.Value = (valObj.CREATE_TIME == DateTime.MinValue) ? "" : valObj.CREATE_TIME.ToString("yyyy-MM-dd"); } } catch (Exception ex) { litWarn.Text = ex.Message; } } }
private void BindList(WF_TYPE condObj, int curPage) { if (condObj.af_PageByAttributeItem == null)//如果不存在用户定义的分页排序属性,则用主键属性排序 { condObj.af_PageBy(WF_TYPE.Attribute.TYPE_ID, Order.Desc); } #region//数据权限条件 #endregion listObj = BLLTable <WF_TYPE> .Factory(conn).SelectByPage(valObj, condObj, aspPager.PageSize, curPage, ref recount); repList.DataSource = listObj; repList.DataBind(); aspPager.RecordCount = recount; }
protected void aspPager_PageChanged(object sender, EventArgs e) { try { if (hidCondition.Value != "") { condObj = JsonServiceBase.FromJson<WF_TYPE>(hidCondition.Value); } listObj = BLLTable<WF_TYPE>.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_TYPE>(hidCondition.Value); } listObj = BLLTable <WF_TYPE> .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 btnFind_Click(object sender, EventArgs e) { condObj = new WF_TYPE(); if (txtTYPE_NAME.Value != "") { condObj.Like(WF_TYPE.Attribute.TYPE_NAME, Convert.ToString(txtTYPE_NAME.Value)); } if (txtCREATER.Value != "") { condObj.Like(WF_TYPE.Attribute.CREATER, Convert.ToString(txtCREATER.Value)); } hidCondition.Value = condObj.ToJson(20); BindList(condObj, 1); }
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_TYPE(); if(txtTYPE_NAME.Value !="" ) condObj.Like(WF_TYPE.Attribute.TYPE_NAME, Convert.ToString(txtTYPE_NAME.Value)); if(txtCREATER.Value !="" ) condObj.Like(WF_TYPE.Attribute.CREATER, Convert.ToString(txtCREATER.Value)); listObj = BLLTable<WF_TYPE>.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 btnOK_Click(object sender, EventArgs e) { try { WF_TYPE valObj = new WF_TYPE(); if(txtTYPE_ID.Value !="" ) valObj.TYPE_ID = Convert.ToInt32(txtTYPE_ID.Value); if(txtTYPE_NAME.Value !="" ) valObj.TYPE_NAME = Convert.ToString(txtTYPE_NAME.Value); if(txtCREATER.Value !="" ) valObj.CREATER = Convert.ToString(txtCREATER.Value); if(txtCREATE_TIME.Value !="" ) valObj.CREATE_TIME = Convert.ToDateTime(txtCREATE_TIME.Value); if (txtSTATUS.Value != "") valObj.STATUS = Convert.ToInt32(txtSTATUS.Value); if (keyid != "") { valObj.TYPE_ID = Convert.ToInt32(keyid); count = BLLTable<WF_TYPE>.Factory(conn).Update(valObj, WF_TYPE.Attribute.TYPE_ID); } else { count = BLLTable<WF_TYPE>.Factory(conn).Insert(valObj, WF_TYPE.Attribute.TYPE_ID); keyid = valObj.TYPE_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", "returnVal='re';parent.pwHide(true);", true); ScriptManager.RegisterStartupScript(Page, this.GetType(), "goto", "if (window.opener){window.opener.returnValue = 're';window.opener.location.reload();}else{window.returnValue = 're';}window.close();", true); } } else { txtTYPE_NAME.Value = ""; } } } catch (Exception ex) { litWarn.Text = ex.Message; } }
protected void Page_Load(object sender, EventArgs e) { title = valObj._ZhName + "�༭"; Page.Title = title; if (!string.IsNullOrEmpty(Request["TYPE_ID"])) { keyid = Request["TYPE_ID"]; } if (!string.IsNullOrEmpty(Request["KeyID"])) { keyid = Request["KeyID"]; } if (!IsPostBack) { txtSTATUS.Items.AddRange(FormHelper.GetListItem(WF_INFO.Attribute.STATUS)); txtCREATE_TIME.Value = (DateTime.Now).ToString("yyyy-MM-dd"); txtCREATER.Value = userBase.StaffName; try { if (keyid != "") { valObj = BLLTable<WF_TYPE>.Factory(conn).GetRowData(WF_TYPE.Attribute.TYPE_ID, keyid); if(valObj==null) return ; txtSTATUS.Value = valObj.STATUS.ToString(); txtTYPE_ID.Value = Convert.ToString(valObj.TYPE_ID);//Convert.ToInt32 txtTYPE_NAME.Value = Convert.ToString(valObj.TYPE_NAME);//Convert.ToString txtCREATER.Value = Convert.ToString(valObj.CREATER);//Convert.ToString txtCREATE_TIME.Value = (valObj.CREATE_TIME == DateTime.MinValue) ? "" : valObj.CREATE_TIME.ToString("yyyy-MM-dd"); } } catch (Exception ex) { litWarn.Text = ex.Message; } } }
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) { 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 = wfobj._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); WF_WFOBJECT cond = new WF_WFOBJECT(); cond.STATUS = 1; List<WF_WFOBJECT> lst = BLLTable<WF_WFOBJECT>.Factory(conn).Select(new WF_WFOBJECT(), cond); WF_TYPE condType = new WF_TYPE(); condType.STATUS = 1; List<WF_TYPE> lstType = BLLTable<WF_TYPE>.Factory(conn).Select(new WF_TYPE(), condType); 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_WFOBJECT l in lll) { litMenu.Text += "<li><a href='" + appPath + "WF/FORMList.aspx?mine=1&WFID=" + l.WF_OBJ_ID + "' data=\"{key:'wf" + l.WF_OBJ_ID + "mylist'}\">" + l.WF_OBJ_NAME + "����</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; 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); } }
protected void btnOK_Click(object sender, EventArgs e) { try { WF_TYPE valObj = new WF_TYPE(); if (txtTYPE_ID.Value != "") { valObj.TYPE_ID = Convert.ToInt32(txtTYPE_ID.Value); } if (txtTYPE_NAME.Value != "") { valObj.TYPE_NAME = Convert.ToString(txtTYPE_NAME.Value); } if (txtCREATER.Value != "") { valObj.CREATER = Convert.ToString(txtCREATER.Value); } if (txtCREATE_TIME.Value != "") { valObj.CREATE_TIME = Convert.ToDateTime(txtCREATE_TIME.Value); } if (txtSTATUS.Value != "") { valObj.STATUS = Convert.ToInt32(txtSTATUS.Value); } if (keyid != "") { valObj.TYPE_ID = Convert.ToInt32(keyid); count = BLLTable <WF_TYPE> .Factory(conn).Update(valObj, WF_TYPE.Attribute.TYPE_ID); } else { count = BLLTable <WF_TYPE> .Factory(conn).Insert(valObj, WF_TYPE.Attribute.TYPE_ID); keyid = valObj.TYPE_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", "returnVal='re';parent.pwHide(true);", true); ScriptManager.RegisterStartupScript(Page, this.GetType(), "goto", "if (window.opener){window.opener.returnValue = 're';window.opener.location.reload();}else{window.returnValue = 're';}window.close();", true); } } else { txtTYPE_NAME.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"])) { 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_WFOBJECT cond = new WF_WFOBJECT(); cond.STATUS = 1; List<WF_WFOBJECT> lst = BLLTable<WF_WFOBJECT>.Factory(conn).Select(new WF_WFOBJECT(), 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_WFOBJECT l in lll) { string purl = url + "&WFID="+l.WF_OBJ_ID; litMenu.Text += "<li><a href='" + purl + "' data=\"{key:'wf" + l.WF_OBJ_ID + "mylist'}\">" + l.WF_OBJ_NAME + "����</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 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 = wfobj._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); WF_WFOBJECT cond = new WF_WFOBJECT(); cond.STATUS = 1; List <WF_WFOBJECT> lst = BLLTable <WF_WFOBJECT> .Factory(conn).Select(new WF_WFOBJECT(), cond); WF_TYPE condType = new WF_TYPE(); condType.STATUS = 1; List <WF_TYPE> lstType = BLLTable <WF_TYPE> .Factory(conn).Select(new WF_TYPE(), condType); 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_WFOBJECT l in lll) { litMenu.Text += "<li><a href='" + appPath + "WF/FORMList.aspx?mine=1&WFID=" + l.WF_OBJ_ID + "' data=\"{key:'wf" + l.WF_OBJ_ID + "mylist'}\">" + l.WF_OBJ_NAME + "管理</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; txtPageSize.Value = "30"; aspPager.PageSize = 30; #endregion #region//数据初始化 //txtSTATUS.Items.AddRange(FormHelper.GetListItem(WF_FORMBASE.Attribute.STATUS)); #endregion BindList(1); } }