protected void aspPager_PageChanged(object sender, EventArgs e) { if (hidCondition.Value != "") { condObj = JsonServiceBase.FromJson <WF_CHECK_LOG>(hidCondition.Value); } BindList(condObj, aspPager.CurrentPageIndex); }
protected void aspPager_PageChanged(object sender, EventArgs e) { if (hidCondition.Value != "") { condObj = JsonServiceBase.FromJson<WF_CHECK_LOG>(hidCondition.Value); } BindList(condObj, aspPager.CurrentPageIndex); }
protected void btnSetPageSize_Click(object sender, EventArgs e) { aspPager.PageSize = int.Parse(txtPageSize.Value); if (hidCondition.Value != "") { condObj = JsonServiceBase.FromJson <WF_CHECK_LOG>(hidCondition.Value); } BindList(condObj, aspPager.CurrentPageIndex); }
protected void Page_Load(object sender, EventArgs e) { //在列表里点击删除按钮,通过AJAX执行这里的后台代码,删除一条记录 if (Request["DelLOG_ID"] != null) { int re = BLLTable <WF_CHECK_LOG> .Factory(conn).Delete(WF_CHECK_LOG.Attribute.LOG_ID, Request["DelLOG_ID"]); if (re > 0) { Response.Write("1");//可以输出数字 大于0 表示操作成功,也可以直接输出 字符串,客户端将弹出此字符串信息作为提示 } else { Response.Write("删除失败!"); } } //在列表顶部点击删除按钮,通过AJAX执行这里的后台代码,删除多条记录 if (Request["DelKeyIDS"] != null) { WF_CHECK_LOG cond = new WF_CHECK_LOG(); cond.In(WF_CHECK_LOG.Attribute.LOG_ID, Request["DelKeyIDS"]); int re = BLLTable <WF_CHECK_LOG> .Factory(conn).Delete(cond); if (re > 0) { Response.Write("1");//可以输出数字 大于0 表示操作成功,也可以直接输出 字符串,客户端将弹出此字符串信息作为提示 } else { Response.Write("删除失败!"); } } //在用户详细信息查看编辑页面,点保存时,通过AJAX执行这里的后台代码,实现部门字段的更新 if (Request["saveInfo"] != null) { WF_CHECK_LOG val = new WF_CHECK_LOG(); 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 <WF_CHECK_LOG> .Factory(conn).Update(val, WF_CHECK_LOG.Attribute.LOG_ID); Response.Write("修改用户信息成功"); } Response.End(); }
protected void Page_Load(object sender, EventArgs e) { //���б�����ɾ����ť��ͨ��AJAXִ������ĺ�̨���룬ɾ��һ����¼ if (Request["DelLOG_ID"] != null) { int re = BLLTable<WF_CHECK_LOG>.Factory(conn).Delete(WF_CHECK_LOG.Attribute.LOG_ID, Request["DelLOG_ID"]); if (re > 0) { Response.Write("1");//����������� ����0 ��ʾ�����ɹ���Ҳ����ֱ����� �ַ������ͻ��˽��������ַ�����Ϣ��Ϊ��ʾ } else { Response.Write("ɾ��ʧ�ܣ�"); } } //���б�������ɾ����ť��ͨ��AJAXִ������ĺ�̨���룬ɾ��������¼ if (Request["DelKeyIDS"] != null) { WF_CHECK_LOG cond = new WF_CHECK_LOG(); cond.In(WF_CHECK_LOG.Attribute.LOG_ID, Request["DelKeyIDS"]); int re = BLLTable<WF_CHECK_LOG>.Factory(conn).Delete(cond); if (re > 0) { Response.Write("1");//����������� ����0 ��ʾ�����ɹ���Ҳ����ֱ����� �ַ������ͻ��˽��������ַ�����Ϣ��Ϊ��ʾ } else { Response.Write("ɾ��ʧ�ܣ�"); } } //���û���ϸ��Ϣ�鿴�༭ҳ�棬�㱣��ʱ��ͨ��AJAXִ������ĺ�̨���룬ʵ�ֲ����ֶεĸ��� if (Request["saveInfo"] != null) { WF_CHECK_LOG val = new WF_CHECK_LOG(); 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<WF_CHECK_LOG>.Factory(conn).Update(val, WF_CHECK_LOG.Attribute.LOG_ID); Response.Write("���û���Ϣ�ɹ�"); } Response.End(); }
protected void btnFind_Click(object sender, EventArgs e) { condObj = new WF_CHECK_LOG(); if(txtLOG_ID.Value !="" ) condObj.Like(WF_CHECK_LOG.Attribute.LOG_ID, Convert.ToInt32(txtLOG_ID.Value)); if(txtWFCID.Value !="" ) condObj.Like(WF_CHECK_LOG.Attribute.WFID, Convert.ToInt32(txtWFCID.Value)); if(txtPROCID.Value !="" ) condObj.Like(WF_CHECK_LOG.Attribute.PROCID, Convert.ToInt32(txtPROCID.Value)); if(txtSTEP_ID.Value !="" ) condObj.Like(WF_CHECK_LOG.Attribute.STEP_ID, Convert.ToInt32(txtSTEP_ID.Value)); if(txtREC_ID.Value !="" ) condObj.Like(WF_CHECK_LOG.Attribute.RECID, Convert.ToString(txtREC_ID.Value)); if(txtDETAIL_ID.Value !="" ) condObj.Like(WF_CHECK_LOG.Attribute.DETAIL_ID, Convert.ToString(txtDETAIL_ID.Value)); if(txtRESULT.Value !="" ) condObj.RESULT = Convert.ToString(txtRESULT.Value); if(txtCHECKER.Value !="" ) condObj.Like(WF_CHECK_LOG.Attribute.CHECKER, Convert.ToString(txtCHECKER.Value)); if(txtCHECK_TIME.Value !="" ) condObj.Like(WF_CHECK_LOG.Attribute.CHECK_TIME, Convert.ToDateTime(txtCHECK_TIME.Value)); if(txtNOTE.Value !="" ) condObj.Like(WF_CHECK_LOG.Attribute.NOTE, Convert.ToString(txtNOTE.Value)); if(txtRESULTS.Value !="" ) condObj.Like(WF_CHECK_LOG.Attribute.RESULTS, Convert.ToString(txtRESULTS.Value)); if(txtCHECKERS.Value !="" ) condObj.Like(WF_CHECK_LOG.Attribute.CHECKERS, Convert.ToString(txtCHECKERS.Value)); if(txtCHECK_TIMES.Value !="" ) condObj.Like(WF_CHECK_LOG.Attribute.CHECK_TIMES, Convert.ToString(txtCHECK_TIMES.Value)); if(txtNOTES.Value !="" ) condObj.Like(WF_CHECK_LOG.Attribute.NOTES, Convert.ToString(txtNOTES.Value)); hidCondition.Value = condObj.ToJson(20); BindList(condObj, 1); }
private void BindList(WF_CHECK_LOG condObj, int curPage) { if (condObj.af_PageByAttributeItem == null)//如果不存在用户定义的分页排序属性,则用主键属性排序 { condObj.af_PageBy(WF_CHECK_LOG.Attribute.LOG_ID, Order.Desc); } #region//数据权限条件 #endregion //condObj.PID = decimal.Parse(pid); listObj = BLLTable <WF_CHECK_LOG> .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) { #region if (!string.IsNullOrEmpty(Request["DEL_RECID"])) { int recid = int.Parse(Request["DEL_RECID"]); WF_FORMBASE objVal = BLLTable<WF_FORMBASE>.Factory(conn).GetRowData(WF_FORMBASE.Attribute.RECID, recid); WFRecordInfo recObj = new WFRecordInfo(objVal, true); if (objVal != null) { int wfid = objVal.WFID; // Dictionary<string, FormField> dicObj = WFRecord.GetFormFieldDicByRecID(wfid, recid); if (objVal.STATUS == "0") { recObj.DeleteByRecID(wfid, recid); if (preUrl == "") { preUrl = "FormList.aspx?WFID=" + wfid + "&Mine=" + StringHelperExd.GetRandomCode(6); } else { if (preUrl.IndexOf("&r=") != -1) { preUrl = preUrl.Replace("&r=", "&r=" + StringHelperExd.GetRandomCode(3)); } else { if (preUrl.IndexOf("?") != -1) { preUrl += "&r=" + StringHelperExd.GetRandomCode(6); } else { preUrl += "?r=" + StringHelperExd.GetRandomCode(6); } } } Response.Redirect(preUrl); //ScriptHelper.AlertAndGo(Page, "删除成功!", preUrl); } else { if (userBase.UserType == "1") { recObj.DeleteByRecID(wfid, recid); if (preUrl == "") { preUrl = "FormList.aspx?WFID=" + wfid + "&Mine=" + StringHelperExd.GetRandomCode(6); } else { if (preUrl.IndexOf("&r=") != -1) { preUrl = preUrl.Replace("&r=", "&r=" + StringHelperExd.GetRandomCode(3)); } else { if (preUrl.IndexOf("?") != -1) { preUrl += "&r=" + StringHelperExd.GetRandomCode(6); } else { preUrl += "?r=" + StringHelperExd.GetRandomCode(6); } } } Response.Redirect(preUrl); //ScriptHelper.AlertAndGo(Page, "删除成功!", preUrl); } else { Response.Write("<h3>已经在审批中,不能删除!<a href='" + preUrl + "'>返回</a></h3>"); } } } else { ScriptHelper.AlertAndGo(Page, "该记录不存在或已被删除!", preUrl); } } #endregion if (Request["GetRECNO"] != null) { Response.ContentEncoding = System.Text.Encoding.UTF8; Response.Write(WFRecordInfo.GetRECNO(Request["DEPT_ID"])); Response.End(); } if (Request["showlog"] != null) { #region WF_CHECK_LOG ccc = new WF_CHECK_LOG(); ccc.WFID = int.Parse(Request["WFID"]); ccc.PROCID = int.Parse(Request["PROCID"]); ccc.STEP_ID = int.Parse(Request["StepID"]); ccc.RECID = int.Parse(Request["RECID"]); WF_CHECK_LOG log = BLLTable<WF_CHECK_LOG>.Factory(conn).GetRowData(ccc); if (log != null) { try { StringBuilder sb = new StringBuilder(); string[] a = StringHelper.GetStringArray(log.RESULTS, '|'); string[] b = StringHelper.GetStringArray(log.CHECKERS, '|'); string[] c = StringHelper.GetStringArray(log.CHECK_TIMES, '|'); string[] d = null; string[] f = null; if (!string.IsNullOrEmpty(log.NOTES)) { d = StringHelper.GetStringArray(log.NOTES, '|'); } if (!string.IsNullOrEmpty(log.ANNEX_FILE)) { f = StringHelper.GetStringArray(log.ANNEX_FILE, '|'); } for (int i = 0; i < a.Length; i++) { string mbr = "", entrust = ""; if (b[i].IndexOf(":") >= 0) { mbr = b[i].Split(':')[0]; entrust = b[i].Split(':')[1]; } else { mbr = b[i]; } sb.Append("<div class='l-row'><p><span>" + mbr + "</span><b>" + WFEnum.GetLogResult(a[i]) + "</b>"); sb.Append("<span>" + entrust + "</span>"); sb.Append("<label>" + c[i] + "</label></p>"); if (d != null && d.Length > i) { sb.Append("<p>" + d[i] + "</p>"); } else { sb.Append("<p>无</p>"); } if (f != null) { if (!string.IsNullOrEmpty(f[i])) { sb.Append("<p>附件:"); string[] lstAnnex = f[i].Split(','); foreach (string strAnnex in lstAnnex) { sb.Append("<a href='" + WebHelper.GetAppPath() + strAnnex + "' target='_blank'>" + strAnnex.Substring(strAnnex.LastIndexOf("/") + 1) + "</a></br>"); } sb.Append("</p>"); } } sb.Append("</div>"); } Response.Write(sb.ToString()); } catch (Exception ex) { Response.Write(ex.Message); } } else { Response.Write("<div class='l-row'><p>无审批记录</p></div>"); } #endregion } if (Request["selVal"] != null) { //获取父下拉框选中的ITEM_ID V_TF_F_COLUMN_ITEM objVC = new V_TF_F_COLUMN_ITEM(); objVC.COLUMN_ID = Convert.ToInt32(Request["Pcolumnid"]); objVC.VALUE = Request["selVal"]; V_TF_F_COLUMN_ITEM objI = BLLTable<V_TF_F_COLUMN_ITEM>.GetRowData(objVC); //获取子下拉框的内容项 if (objI != null) { V_TF_F_COLUMN_ITEM objV = new V_TF_F_COLUMN_ITEM(); objV.Distinct = true; objV.VALUE = ""; objV.TEXT = ""; objVC = new V_TF_F_COLUMN_ITEM(); objVC.COLUMN_ID = Convert.ToInt32(Request["columnid"]); objVC.DROP_REAL = Convert.ToString(objI.ITEM_ID); List<V_TF_F_COLUMN_ITEM> lstv = BLLTable<V_TF_F_COLUMN_ITEM>.Select(objV, objVC); if (lstv.Count > 0) { Response.Write("{\"list\":" + JsonUtil.getJsonStr<V_TF_F_COLUMN_ITEM>(lstv) + ",\"first\":\"" + lstv[0].ITEM_ID + "\"}"); } else { Response.Write("{\"list\":\"\",\"first\":\"\"}"); } } } Response.End(); }
protected void btnOK_Click(object sender, EventArgs e) { try { WF_CHECK_LOG valObj = new WF_CHECK_LOG(); if (txtLOG_ID.Value != "") { valObj.LOG_ID = Convert.ToInt32(txtLOG_ID.Value); } if (txtWFCID.Value != "") { valObj.WFID = Convert.ToInt32(txtWFCID.Value); } if (txtPROCID.Value != "") { valObj.PROCID = Convert.ToInt32(txtPROCID.Value); } if (txtSTEP_ID.Value != "") { valObj.STEP_ID = Convert.ToInt32(txtSTEP_ID.Value); } if (txtREC_ID.Value != "") { valObj.RECID = Convert.ToInt32(txtREC_ID.Value); } if (txtDETAIL_ID.Value != "") { valObj.DETAIL_ID = Convert.ToString(txtDETAIL_ID.Value); } if (txtRESULT.Value != "") { valObj.RESULT = Convert.ToString(txtRESULT.Value); } if (txtCHECKER.Value != "") { valObj.CHECKER = Convert.ToString(txtCHECKER.Value); } if (txtCHECK_TIME.Value != "") { valObj.CHECK_TIME = Convert.ToDateTime(txtCHECK_TIME.Value); } if (txtNOTE.Value != "") { valObj.NOTE = Convert.ToString(txtNOTE.Value); } if (txtRESULTS.Value != "") { valObj.RESULTS = Convert.ToString(txtRESULTS.Value); } if (txtCHECKERS.Value != "") { valObj.CHECKERS = Convert.ToString(txtCHECKERS.Value); } if (txtCHECK_TIMES.Value != "") { valObj.CHECK_TIMES = Convert.ToString(txtCHECK_TIMES.Value); } if (txtNOTES.Value != "") { valObj.NOTES = Convert.ToString(txtNOTES.Value); } if (keyid != "") { valObj.LOG_ID = Convert.ToInt32(keyid); count = BLLTable <WF_CHECK_LOG> .Factory(conn).Update(valObj, WF_CHECK_LOG.Attribute.LOG_ID); } else { count = BLLTable <WF_CHECK_LOG> .Factory(conn).Insert(valObj, WF_CHECK_LOG.Attribute.LOG_ID); keyid = valObj.LOG_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("})"); Button btn = (Button)sender; if (btn.ID == "btnOK") { if (ViewState["hadSave"] == null) { ScriptManager.RegisterStartupScript(Page, this.GetType(), "goto", "if (window.opener){window.opener.returnValue = '" + sbData.ToString() + "';}else{window.returnValue = '" + sbData.ToString() + "';}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 { txtLOG_ID.Value = ""; txtWFCID.Value = ""; txtPROCID.Value = ""; txtSTEP_ID.Value = ""; txtREC_ID.Value = ""; txtDETAIL_ID.Value = ""; txtRESULT.Value = ""; txtCHECKER.Value = ""; txtCHECK_TIME.Value = ""; txtNOTE.Value = ""; txtRESULTS.Value = ""; txtCHECKERS.Value = ""; txtCHECK_TIMES.Value = ""; txtNOTES.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["LOG_ID"])) { keyid = Request["LOG_ID"]; } if (!IsPostBack) { txtRESULT.Items.AddRange(FormHelper.GetListItem(WF_CHECK_LOG.Attribute.RESULT)); txtCHECK_TIME.Value = (DateTime.Now).ToString("yyyy-MM-dd"); this.txtLOG_ID.Disabled = true; this.txtLOG_ID.Attributes["class"] = "dis"; try { if (keyid != "") { valObj = BLLTable <WF_CHECK_LOG> .Factory(conn).GetRowData(WF_CHECK_LOG.Attribute.LOG_ID, Request["LOG_ID"]); if (valObj == null) { return; } txtLOG_ID.Value = Convert.ToString(valObj.LOG_ID); //Convert.ToInt32 txtWFCID.Value = Convert.ToString(valObj.WFID); //Convert.ToInt32 txtPROCID.Value = Convert.ToString(valObj.PROCID); //Convert.ToInt32 txtSTEP_ID.Value = Convert.ToString(valObj.STEP_ID); //Convert.ToInt32 txtREC_ID.Value = Convert.ToString(valObj.RECID); //Convert.ToString txtDETAIL_ID.Value = Convert.ToString(valObj.DETAIL_ID); //Convert.ToString txtRESULT.Value = valObj.RESULT.ToString(); txtCHECKER.Value = Convert.ToString(valObj.CHECKER);//Convert.ToString txtCHECK_TIME.Value = (valObj.CHECK_TIME == DateTime.MinValue) ? "" : valObj.CHECK_TIME.ToString("yyyy-MM-dd"); txtNOTE.Value = Convert.ToString(valObj.NOTE); //Convert.ToString txtRESULTS.Value = Convert.ToString(valObj.RESULTS); //Convert.ToString txtCHECKERS.Value = Convert.ToString(valObj.CHECKERS); //Convert.ToString txtCHECK_TIMES.Value = Convert.ToString(valObj.CHECK_TIMES); //Convert.ToString txtNOTES.Value = Convert.ToString(valObj.NOTES); //Convert.ToString } } catch (Exception ex) { litWarn.Text = ex.Message; } } }
protected void btnOK_Click(object sender, EventArgs e) { try { WF_CHECK_LOG valObj = new WF_CHECK_LOG(); if(txtLOG_ID.Value !="" ) valObj.LOG_ID = Convert.ToInt32(txtLOG_ID.Value); if(txtWFCID.Value !="" ) valObj.WFID = Convert.ToInt32(txtWFCID.Value); if(txtPROCID.Value !="" ) valObj.PROCID = Convert.ToInt32(txtPROCID.Value); if(txtSTEP_ID.Value !="" ) valObj.STEP_ID = Convert.ToInt32(txtSTEP_ID.Value); if(txtREC_ID.Value !="" ) valObj.RECID = Convert.ToInt32(txtREC_ID.Value); if(txtDETAIL_ID.Value !="" ) valObj.DETAIL_ID = Convert.ToString(txtDETAIL_ID.Value); if(txtRESULT.Value !="" ) valObj.RESULT = Convert.ToString(txtRESULT.Value); if(txtCHECKER.Value !="" ) valObj.CHECKER = Convert.ToString(txtCHECKER.Value); if(txtCHECK_TIME.Value !="" ) valObj.CHECK_TIME = Convert.ToDateTime(txtCHECK_TIME.Value); if(txtNOTE.Value !="" ) valObj.NOTE = Convert.ToString(txtNOTE.Value); if(txtRESULTS.Value !="" ) valObj.RESULTS = Convert.ToString(txtRESULTS.Value); if(txtCHECKERS.Value !="" ) valObj.CHECKERS = Convert.ToString(txtCHECKERS.Value); if(txtCHECK_TIMES.Value !="" ) valObj.CHECK_TIMES = Convert.ToString(txtCHECK_TIMES.Value); if(txtNOTES.Value !="" ) valObj.NOTES = Convert.ToString(txtNOTES.Value); if (keyid != "") { valObj.LOG_ID = Convert.ToInt32(keyid); count = BLLTable<WF_CHECK_LOG>.Factory(conn).Update(valObj, WF_CHECK_LOG.Attribute.LOG_ID); } else { count = BLLTable<WF_CHECK_LOG>.Factory(conn).Insert(valObj, WF_CHECK_LOG.Attribute.LOG_ID); keyid = valObj.LOG_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("})"); Button btn = (Button)sender; if (btn.ID == "btnOK") { if (ViewState["hadSave"] == null) { ScriptManager.RegisterStartupScript(Page, this.GetType(), "goto", "if (window.opener){window.opener.returnValue = '" + sbData.ToString() + "';}else{window.returnValue = '" + sbData.ToString() + "';}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 { txtLOG_ID.Value =""; txtWFCID.Value =""; txtPROCID.Value =""; txtSTEP_ID.Value =""; txtREC_ID.Value =""; txtDETAIL_ID.Value =""; txtRESULT.Value =""; txtCHECKER.Value =""; txtCHECK_TIME.Value =""; txtNOTE.Value =""; txtRESULTS.Value =""; txtCHECKERS.Value =""; txtCHECK_TIMES.Value =""; txtNOTES.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["LOG_ID"])) { keyid = Request["LOG_ID"]; } if (!IsPostBack) { txtRESULT.Items.AddRange(FormHelper.GetListItem(WF_CHECK_LOG.Attribute.RESULT)); txtCHECK_TIME.Value = (DateTime.Now).ToString("yyyy-MM-dd"); this.txtLOG_ID.Disabled = true; this.txtLOG_ID.Attributes["class"] = "dis"; try { if (keyid != "") { valObj = BLLTable<WF_CHECK_LOG>.Factory(conn).GetRowData(WF_CHECK_LOG.Attribute.LOG_ID, Request["LOG_ID"]); if(valObj==null) return ; txtLOG_ID.Value = Convert.ToString(valObj.LOG_ID);//Convert.ToInt32 txtWFCID.Value = Convert.ToString(valObj.WFID);//Convert.ToInt32 txtPROCID.Value = Convert.ToString(valObj.PROCID);//Convert.ToInt32 txtSTEP_ID.Value = Convert.ToString(valObj.STEP_ID);//Convert.ToInt32 txtREC_ID.Value = Convert.ToString(valObj.RECID);//Convert.ToString txtDETAIL_ID.Value = Convert.ToString(valObj.DETAIL_ID);//Convert.ToString txtRESULT.Value=valObj.RESULT.ToString(); txtCHECKER.Value = Convert.ToString(valObj.CHECKER);//Convert.ToString txtCHECK_TIME.Value = (valObj.CHECK_TIME == DateTime.MinValue) ? "" : valObj.CHECK_TIME.ToString("yyyy-MM-dd"); txtNOTE.Value = Convert.ToString(valObj.NOTE);//Convert.ToString txtRESULTS.Value = Convert.ToString(valObj.RESULTS);//Convert.ToString txtCHECKERS.Value = Convert.ToString(valObj.CHECKERS);//Convert.ToString txtCHECK_TIMES.Value = Convert.ToString(valObj.CHECK_TIMES);//Convert.ToString txtNOTES.Value = Convert.ToString(valObj.NOTES);//Convert.ToString } } catch (Exception ex) { litWarn.Text = ex.Message; } } }
private void BindList(WF_CHECK_LOG condObj, int curPage) { if (condObj.af_PageByAttributeItem == null)//����������û�����ķ�ҳ�������ԣ����������������� condObj.af_PageBy(WF_CHECK_LOG.Attribute.LOG_ID, Order.Desc); #region//����Ȩ������ #endregion //condObj.PID = decimal.Parse(pid); listObj = BLLTable<WF_CHECK_LOG>.Factory(conn).SelectByPage(valObj, condObj, aspPager.PageSize, curPage, ref recount); repList.DataSource = listObj; repList.DataBind(); aspPager.RecordCount = recount; }
protected void btnFind_Click(object sender, EventArgs e) { condObj = new WF_CHECK_LOG(); if (txtLOG_ID.Value != "") { condObj.Like(WF_CHECK_LOG.Attribute.LOG_ID, Convert.ToInt32(txtLOG_ID.Value)); } if (txtWFCID.Value != "") { condObj.Like(WF_CHECK_LOG.Attribute.WFID, Convert.ToInt32(txtWFCID.Value)); } if (txtPROCID.Value != "") { condObj.Like(WF_CHECK_LOG.Attribute.PROCID, Convert.ToInt32(txtPROCID.Value)); } if (txtSTEP_ID.Value != "") { condObj.Like(WF_CHECK_LOG.Attribute.STEP_ID, Convert.ToInt32(txtSTEP_ID.Value)); } if (txtREC_ID.Value != "") { condObj.Like(WF_CHECK_LOG.Attribute.RECID, Convert.ToString(txtREC_ID.Value)); } if (txtDETAIL_ID.Value != "") { condObj.Like(WF_CHECK_LOG.Attribute.DETAIL_ID, Convert.ToString(txtDETAIL_ID.Value)); } if (txtRESULT.Value != "") { condObj.RESULT = Convert.ToString(txtRESULT.Value); } if (txtCHECKER.Value != "") { condObj.Like(WF_CHECK_LOG.Attribute.CHECKER, Convert.ToString(txtCHECKER.Value)); } if (txtCHECK_TIME.Value != "") { condObj.Like(WF_CHECK_LOG.Attribute.CHECK_TIME, Convert.ToDateTime(txtCHECK_TIME.Value)); } if (txtNOTE.Value != "") { condObj.Like(WF_CHECK_LOG.Attribute.NOTE, Convert.ToString(txtNOTE.Value)); } if (txtRESULTS.Value != "") { condObj.Like(WF_CHECK_LOG.Attribute.RESULTS, Convert.ToString(txtRESULTS.Value)); } if (txtCHECKERS.Value != "") { condObj.Like(WF_CHECK_LOG.Attribute.CHECKERS, Convert.ToString(txtCHECKERS.Value)); } if (txtCHECK_TIMES.Value != "") { condObj.Like(WF_CHECK_LOG.Attribute.CHECK_TIMES, Convert.ToString(txtCHECK_TIMES.Value)); } if (txtNOTES.Value != "") { condObj.Like(WF_CHECK_LOG.Attribute.NOTES, Convert.ToString(txtNOTES.Value)); } hidCondition.Value = condObj.ToJson(20); BindList(condObj, 1); }
protected void btnSetPageSize_Click(object sender, EventArgs e) { aspPager.PageSize = int.Parse(txtPageSize.Value); if (hidCondition.Value != "") { condObj = JsonServiceBase.FromJson<WF_CHECK_LOG>(hidCondition.Value); } BindList(condObj, aspPager.CurrentPageIndex); }
protected void Page_Load(object sender, EventArgs e) { #region if (!string.IsNullOrEmpty(Request["DEL_RECID"])) { int recid = int.Parse(Request["DEL_RECID"]); WF_FORMBASE objVal = BLLTable <WF_FORMBASE> .Factory(conn).GetRowData(WF_FORMBASE.Attribute.RECID, recid); WFRecordInfo recObj = new WFRecordInfo(objVal, true); if (objVal != null) { int wfid = objVal.WFID; // Dictionary<string, FormField> dicObj = WFRecord.GetFormFieldDicByRecID(wfid, recid); if (objVal.STATUS == "0") { recObj.DeleteByRecID(wfid, recid); if (preUrl == "") { preUrl = "FormList.aspx?WFID=" + wfid + "&Mine=" + StringHelperExd.GetRandomCode(6); } else { if (preUrl.IndexOf("&r=") != -1) { preUrl = preUrl.Replace("&r=", "&r=" + StringHelperExd.GetRandomCode(3)); } else { if (preUrl.IndexOf("?") != -1) { preUrl += "&r=" + StringHelperExd.GetRandomCode(6); } else { preUrl += "?r=" + StringHelperExd.GetRandomCode(6); } } } Response.Redirect(preUrl); //ScriptHelper.AlertAndGo(Page, "删除成功!", preUrl); } else { if (userBase.UserType == "1") { recObj.DeleteByRecID(wfid, recid); if (preUrl == "") { preUrl = "FormList.aspx?WFID=" + wfid + "&Mine=" + StringHelperExd.GetRandomCode(6); } else { if (preUrl.IndexOf("&r=") != -1) { preUrl = preUrl.Replace("&r=", "&r=" + StringHelperExd.GetRandomCode(3)); } else { if (preUrl.IndexOf("?") != -1) { preUrl += "&r=" + StringHelperExd.GetRandomCode(6); } else { preUrl += "?r=" + StringHelperExd.GetRandomCode(6); } } } Response.Redirect(preUrl); //ScriptHelper.AlertAndGo(Page, "删除成功!", preUrl); } else { Response.Write("<h3>已经在审批中,不能删除!<a href='" + preUrl + "'>返回</a></h3>"); } } } else { ScriptHelper.AlertAndGo(Page, "该记录不存在或已被删除!", preUrl); } } #endregion if (Request["GetRECNO"] != null) { Response.ContentEncoding = System.Text.Encoding.UTF8; Response.Write(WFRecordInfo.GetRECNO(Request["DEPT_ID"])); Response.End(); } if (Request["showlog"] != null) { #region WF_CHECK_LOG ccc = new WF_CHECK_LOG(); ccc.WFID = int.Parse(Request["WFID"]); ccc.PROCID = int.Parse(Request["PROCID"]); ccc.STEP_ID = int.Parse(Request["StepID"]); ccc.RECID = int.Parse(Request["RECID"]); WF_CHECK_LOG log = BLLTable <WF_CHECK_LOG> .Factory(conn).GetRowData(ccc); if (log != null) { try { StringBuilder sb = new StringBuilder(); string[] a = StringHelper.GetStringArray(log.RESULTS, '|'); string[] b = StringHelper.GetStringArray(log.CHECKERS, '|'); string[] c = StringHelper.GetStringArray(log.CHECK_TIMES, '|'); string[] d = null; string[] f = null; if (!string.IsNullOrEmpty(log.NOTES)) { d = StringHelper.GetStringArray(log.NOTES, '|'); } if (!string.IsNullOrEmpty(log.ANNEX_FILE)) { f = StringHelper.GetStringArray(log.ANNEX_FILE, '|'); } for (int i = 0; i < a.Length; i++) { string mbr = "", entrust = ""; if (b[i].IndexOf(":") >= 0) { mbr = b[i].Split(':')[0]; entrust = b[i].Split(':')[1]; } else { mbr = b[i]; } sb.Append("<div class='l-row'><p><span>" + mbr + "</span><b>" + WFEnum.GetLogResult(a[i]) + "</b>"); sb.Append("<span>" + entrust + "</span>"); sb.Append("<label>" + c[i] + "</label></p>"); if (d != null && d.Length > i) { sb.Append("<p>" + d[i] + "</p>"); } else { sb.Append("<p>无</p>"); } if (f != null) { if (!string.IsNullOrEmpty(f[i])) { sb.Append("<p>附件:"); string[] lstAnnex = f[i].Split(','); foreach (string strAnnex in lstAnnex) { sb.Append("<a href='" + WebHelper.GetAppPath() + strAnnex + "' target='_blank'>" + strAnnex.Substring(strAnnex.LastIndexOf("/") + 1) + "</a></br>"); } sb.Append("</p>"); } } sb.Append("</div>"); } Response.Write(sb.ToString()); } catch (Exception ex) { Response.Write(ex.Message); } } else { Response.Write("<div class='l-row'><p>无审批记录</p></div>"); } #endregion } if (Request["selVal"] != null) { //获取父下拉框选中的ITEM_ID V_TF_F_COLUMN_ITEM objVC = new V_TF_F_COLUMN_ITEM(); objVC.COLUMN_ID = Convert.ToInt32(Request["Pcolumnid"]); objVC.VALUE = Request["selVal"]; V_TF_F_COLUMN_ITEM objI = BLLTable <V_TF_F_COLUMN_ITEM> .GetRowData(objVC); //获取子下拉框的内容项 if (objI != null) { V_TF_F_COLUMN_ITEM objV = new V_TF_F_COLUMN_ITEM(); objV.Distinct = true; objV.VALUE = ""; objV.TEXT = ""; objVC = new V_TF_F_COLUMN_ITEM(); objVC.COLUMN_ID = Convert.ToInt32(Request["columnid"]); objVC.DROP_REAL = Convert.ToString(objI.ITEM_ID); List <V_TF_F_COLUMN_ITEM> lstv = BLLTable <V_TF_F_COLUMN_ITEM> .Select(objV, objVC); if (lstv.Count > 0) { Response.Write("{\"list\":" + JsonUtil.getJsonStr <V_TF_F_COLUMN_ITEM>(lstv) + ",\"first\":\"" + lstv[0].ITEM_ID + "\"}"); } else { Response.Write("{\"list\":\"\",\"first\":\"\"}"); } } } Response.End(); }
protected void Page_Load(object sender, EventArgs e) { title = valObj._ZhName + "详细"; Page.Title = title; if (!IsPostBack) { try { if (!string.IsNullOrEmpty(Request["LOG_ID"])) { valObj = BLLTable <WF_CHECK_LOG> .Factory(conn).GetRowData(WF_CHECK_LOG.Attribute.LOG_ID, Request["LOG_ID"]); if (valObj == null) { return; } txtLOG_ID.Text = Convert.ToString(valObj.LOG_ID);//Convert.ToInt32 txtWFCID.Text = Convert.ToString(valObj.WFID);//Convert.ToInt32 txtPROCID.Text = Convert.ToString(valObj.PROCID);//Convert.ToInt32 txtSTEP_ID.Text = Convert.ToString(valObj.STEP_ID);//Convert.ToInt32 txtREC_ID.Text = Convert.ToString(valObj.RECID);//Convert.ToString txtDETAIL_ID.Text = Convert.ToString(valObj.DETAIL_ID);//Convert.ToString txtRESULT.Text = valObj.RESULT.ToString(); txtCHECKER.Text = Convert.ToString(valObj.CHECKER);//Convert.ToString txtCHECK_TIME.Text = (valObj.CHECK_TIME == DateTime.MinValue) ? "" : valObj.CHECK_TIME.ToString("yyyy-MM-dd HH:mm"); txtNOTE.Text = Convert.ToString(valObj.NOTE);//Convert.ToString txtRESULTS.Text = Convert.ToString(valObj.RESULTS);//Convert.ToString txtCHECKERS.Text = Convert.ToString(valObj.CHECKERS);//Convert.ToString txtCHECK_TIMES.Text = Convert.ToString(valObj.CHECK_TIMES);//Convert.ToString txtNOTES.Text = Convert.ToString(valObj.NOTES);//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) { title = valObj._ZhName + "��ϸ"; Page.Title = title; if (!IsPostBack) { try { if (!string.IsNullOrEmpty(Request["LOG_ID"])) { valObj = BLLTable<WF_CHECK_LOG>.Factory(conn).GetRowData(WF_CHECK_LOG.Attribute.LOG_ID, Request["LOG_ID"]); if(valObj==null) return ; txtLOG_ID.Text = Convert.ToString(valObj.LOG_ID);//Convert.ToInt32 txtWFCID.Text = Convert.ToString(valObj.WFID);//Convert.ToInt32 txtPROCID.Text = Convert.ToString(valObj.PROCID);//Convert.ToInt32 txtSTEP_ID.Text = Convert.ToString(valObj.STEP_ID);//Convert.ToInt32 txtREC_ID.Text = Convert.ToString(valObj.RECID);//Convert.ToString txtDETAIL_ID.Text = Convert.ToString(valObj.DETAIL_ID);//Convert.ToString txtRESULT.Text=valObj.RESULT.ToString(); txtCHECKER.Text = Convert.ToString(valObj.CHECKER);//Convert.ToString txtCHECK_TIME.Text = (valObj.CHECK_TIME == DateTime.MinValue) ? "" : valObj.CHECK_TIME.ToString("yyyy-MM-dd HH:mm"); txtNOTE.Text = Convert.ToString(valObj.NOTE);//Convert.ToString txtRESULTS.Text = Convert.ToString(valObj.RESULTS);//Convert.ToString txtCHECKERS.Text = Convert.ToString(valObj.CHECKERS);//Convert.ToString txtCHECK_TIMES.Text = Convert.ToString(valObj.CHECK_TIMES);//Convert.ToString txtNOTES.Text = Convert.ToString(valObj.NOTES);//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(); } } }