protected void aspPager_PageChanged(object sender, EventArgs e) { if (hidCondition.Value != "") { condObj = JsonServiceBase.FromJson<KM_SUB_STRU>(hidCondition.Value); } BindList(condObj, aspPager.CurrentPageIndex); }
protected void aspPager_PageChanged(object sender, EventArgs e) { if (hidCondition.Value != "") { condObj = JsonServiceBase.FromJson <KM_SUB_STRU>(hidCondition.Value); } BindList(condObj, aspPager.CurrentPageIndex); }
protected void btnSetPageNum_Click(object sender, EventArgs e) { aspPager.PageSize = int.Parse(txtPageNum.Value); if (hidCondition.Value != "") { condObj = JsonServiceBase.FromJson <KM_SUB_STRU>(hidCondition.Value); } BindList(condObj, aspPager.CurrentPageIndex); }
private void BindList(KM_SUB_STRU condObj) { if (condObj.af_PageByAttributeItem == null)//����������û�����ķ�ҳ�������ԣ����������������� condObj.af_PageBy(KM_SUB_STRU.Attribute.SUB_ID, Order.Desc); listObj = BLLTable<KM_SUB_STRU>.Factory(conn).Select(valObj, condObj); repList.DataSource = listObj; repList.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { //在列表里点击删除按钮,通过AJAX执行这里的后台代码,删除一条记录 if (Request["DelSUB_ID"] != null) { int re = BLLTable <KM_SUB_STRU> .Factory(conn).Delete(KM_SUB_STRU.Attribute.SUB_ID, Request["DelSUB_ID"]); if (re > 0) { Response.Write("1");//可以输出数字 大于0 表示操作成功,也可以直接输出 字符串,客户端将弹出此字符串信息作为提示 } else { Response.Write("删除失败!"); } } //在列表顶部点击删除按钮,通过AJAX执行这里的后台代码,删除多条记录 if (Request["DelKeyIDS"] != null) { KM_SUB_STRU cond = new KM_SUB_STRU(); cond.In(KM_SUB_STRU.Attribute.SUB_ID, Request["DelKeyIDS"]); int re = BLLTable <KM_SUB_STRU> .Factory(conn).Delete(cond); if (re > 0) { Response.Write("1");//可以输出数字 大于0 表示操作成功,也可以直接输出 字符串,客户端将弹出此字符串信息作为提示 } else { Response.Write("删除失败!"); } } //在用户详细信息查看编辑页面,点保存时,通过AJAX执行这里的后台代码,实现部门字段的更新 if (Request["saveInfo"] != null) { KM_SUB_STRU val = new KM_SUB_STRU(); val.SUB_ID = 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 <KM_SUB_STRU> .Factory(conn).Update(val, KM_SUB_STRU.Attribute.SUB_ID); Response.Write("修改用户信息成功"); } Response.End(); }
private void BindList(KM_SUB_STRU condObj, int curPage) { if (condObj.af_PageByAttributeItem == null)//如果不存在用户定义的分页排序属性,则用主键属性排序 { condObj.af_PageBy(KM_SUB_STRU.Attribute.SUB_ID, Order.Desc); } listObj = BLLTable <KM_SUB_STRU> .Factory(conn).SelectByPage(valObj, condObj, aspPager.PageSize, curPage, ref recount); repList.DataSource = listObj; repList.DataBind(); aspPager.RecordCount = recount; }
private void BindList(KM_SUB_STRU condObj) { if (condObj.af_PageByAttributeItem == null)//如果不存在用户定义的分页排序属性,则用主键属性排序 { condObj.af_PageBy(KM_SUB_STRU.Attribute.SUB_ID, Order.Desc); } listObj = BLLTable <KM_SUB_STRU> .Factory(conn).Select(valObj, condObj); repList.DataSource = listObj; repList.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { //���б�����ɾ����ť��ͨ��AJAXִ������ĺ�̨���룬ɾ��һ����¼ if (Request["DelSUB_ID"] != null) { int re = BLLTable<KM_SUB_STRU>.Factory(conn).Delete(KM_SUB_STRU.Attribute.SUB_ID, Request["DelSUB_ID"]); if (re > 0) { Response.Write("1");//����������� ����0 ��ʾ�����ɹ���Ҳ����ֱ����� �ַ������ͻ��˽��������ַ�����Ϣ��Ϊ��ʾ } else { Response.Write("ɾ��ʧ�ܣ�"); } } //���б�������ɾ����ť��ͨ��AJAXִ������ĺ�̨���룬ɾ��������¼ if (Request["DelKeyIDS"] != null) { KM_SUB_STRU cond = new KM_SUB_STRU(); cond.In(KM_SUB_STRU.Attribute.SUB_ID, Request["DelKeyIDS"]); int re = BLLTable<KM_SUB_STRU>.Factory(conn).Delete(cond); if (re > 0) { Response.Write("1");//����������� ����0 ��ʾ�����ɹ���Ҳ����ֱ����� �ַ������ͻ��˽��������ַ�����Ϣ��Ϊ��ʾ } else { Response.Write("ɾ��ʧ�ܣ�"); } } //���û���ϸ��Ϣ�鿴�༭ҳ�棬�㱣��ʱ��ͨ��AJAXִ������ĺ�̨���룬ʵ�ֲ����ֶεĸ��� if (Request["saveInfo"] != null) { KM_SUB_STRU val = new KM_SUB_STRU(); val.SUB_ID = 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<KM_SUB_STRU>.Factory(conn).Update(val, KM_SUB_STRU.Attribute.SUB_ID); Response.Write("���û���Ϣ�ɹ�"); } Response.End(); }
protected void aspPager_PageChanged(object sender, EventArgs e) { try { if (hidCondition.Value != "") { condObj = JsonServiceBase.FromJson<KM_SUB_STRU>(hidCondition.Value); } listObj = BLLTable<KM_SUB_STRU>.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 <KM_SUB_STRU>(hidCondition.Value); } listObj = BLLTable <KM_SUB_STRU> .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 KM_SUB_STRU(); if (txtSUB_ID.Value != "") { condObj.Like(KM_SUB_STRU.Attribute.SUB_ID, Convert.ToString(txtSUB_ID.Value)); } if (txtSUB_NAME.Value != "") { condObj.Like(KM_SUB_STRU.Attribute.SUB_NAME, Convert.ToString(txtSUB_NAME.Value)); } if (txtK_SUB_ID.Value != "") { condObj.Like(KM_SUB_STRU.Attribute.K_SUB_ID, Convert.ToString(txtK_SUB_ID.Value)); } if (txtSUB_CONTENT.Value != "") { condObj.Like(KM_SUB_STRU.Attribute.SUB_CONTENT, Convert.ToString(txtSUB_CONTENT.Value)); } if (txtSUB_CLASS_ID.Value != "") { condObj.Like(KM_SUB_STRU.Attribute.SUB_CLASS_ID, Convert.ToString(txtSUB_CLASS_ID.Value)); } if (txtSUB_EA_SIGN.Value != "") { condObj.Like(KM_SUB_STRU.Attribute.SUB_EA_SIGN, Convert.ToString(txtSUB_EA_SIGN.Value)); } if (txtSUB_AUTHOR.Value != "") { condObj.Like(KM_SUB_STRU.Attribute.SUB_AUTHOR, Convert.ToString(txtSUB_AUTHOR.Value)); } if (txtSUB_IS_READ.Value != "") { condObj.Like(KM_SUB_STRU.Attribute.SUB_IS_READ, Convert.ToString(txtSUB_IS_READ.Value)); } if (txtSORT_NO.Value != "") { condObj.Like(KM_SUB_STRU.Attribute.SORT_NO, Convert.ToDecimal(txtSORT_NO.Value)); } if (txtIDPATH.Value != "") { condObj.Like(KM_SUB_STRU.Attribute.IDPATH, Convert.ToString(txtIDPATH.Value)); } if (txtKNAME.Value != "") { condObj.Like(KM_SUB_STRU.Attribute.KNAME, Convert.ToString(txtKNAME.Value)); } if (txtSNAME.Value != "") { condObj.Like(KM_SUB_STRU.Attribute.SNAME, Convert.ToString(txtSNAME.Value)); } if (txtRNAME.Value != "") { condObj.Like(KM_SUB_STRU.Attribute.RNAME, Convert.ToString(txtRNAME.Value)); } if (txtSUB_NUM.Value != "") { condObj.Like(KM_SUB_STRU.Attribute.SUB_NUM, Convert.ToDecimal(txtSUB_NUM.Value)); } if (txtSUBOBJECT_NUM.Value != "") { condObj.Like(KM_SUB_STRU.Attribute.SUBOBJECT_NUM, Convert.ToDecimal(txtSUBOBJECT_NUM.Value)); } if (txtUSE_FLAG.Value != "") { condObj.Like(KM_SUB_STRU.Attribute.USE_FLAG, Convert.ToString(txtUSE_FLAG.Value)); } if (txtEXP1.Value != "") { condObj.Like(KM_SUB_STRU.Attribute.EXP1, Convert.ToString(txtEXP1.Value)); } if (txtEXP2.Value != "") { condObj.Like(KM_SUB_STRU.Attribute.EXP2, Convert.ToString(txtEXP2.Value)); } if (txtEXP3.Value != "") { condObj.Like(KM_SUB_STRU.Attribute.EXP3, Convert.ToString(txtEXP3.Value)); } if (txtEXP4.Value != "") { condObj.Like(KM_SUB_STRU.Attribute.EXP4, Convert.ToString(txtEXP4.Value)); } hidCondition.Value = condObj.ToJson(20); BindList(condObj, 1); }
protected void Page_Load(object sender, EventArgs e) { title = valObj._ZhName + "¸ß¼¶Î¬»¤"; Page.Title = title; if (!IsPostBack) { try { if (!string.IsNullOrEmpty(Request["SUB_ID"])) { valObj = BLLTable <KM_SUB_STRU> .Factory(conn).GetRowData(KM_SUB_STRU.Attribute.SUB_ID, Request["SUB_ID"]); if (valObj == null) { return; } txtSUB_ID.Text = Convert.ToString(valObj.SUB_ID); //Convert.ToString txtSUB_NAME.Text = Convert.ToString(valObj.SUB_NAME); //Convert.ToString txtK_SUB_ID.Text = Convert.ToString(valObj.K_SUB_ID); //Convert.ToString txtSUB_CONTENT.Text = Convert.ToString(valObj.SUB_CONTENT); //Convert.ToString txtSUB_CLASS_ID.Text = Convert.ToString(valObj.SUB_CLASS_ID); //Convert.ToString txtSUB_EA_SIGN.Text = Convert.ToString(valObj.SUB_EA_SIGN); //Convert.ToString txtSUB_AUTHOR.Text = Convert.ToString(valObj.SUB_AUTHOR); //Convert.ToString txtSUB_IS_READ.Text = Convert.ToString(valObj.SUB_IS_READ); //Convert.ToString txtSORT_NO.Text = Convert.ToString(valObj.SORT_NO); //Convert.ToDecimal txtIDPATH.Text = Convert.ToString(valObj.IDPATH); //Convert.ToString txtKNAME.Text = Convert.ToString(valObj.KNAME); //Convert.ToString txtSNAME.Text = Convert.ToString(valObj.SNAME); //Convert.ToString txtRNAME.Text = Convert.ToString(valObj.RNAME); //Convert.ToString txtSUB_NUM.Text = Convert.ToString(valObj.SUB_NUM); //Convert.ToDecimal txtSUBOBJECT_NUM.Text = Convert.ToString(valObj.SUBOBJECT_NUM); //Convert.ToDecimal txtUSE_FLAG.Text = Convert.ToString(valObj.USE_FLAG); //Convert.ToString txtEXP1.Text = Convert.ToString(valObj.EXP1); //Convert.ToString txtEXP2.Text = Convert.ToString(valObj.EXP2); //Convert.ToString txtEXP3.Text = Convert.ToString(valObj.EXP3); //Convert.ToString txtEXP4.Text = Convert.ToString(valObj.EXP4); //Convert.ToString } } 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["SUB_ID"])) { keyid = Request["SUB_ID"]; } if (!IsPostBack) { this.txtSUB_ID.Attributes["readonly"] = "readonly"; this.txtSUB_ID.Attributes["disabled"] = "disabled"; this.txtSUB_ID.Style["background-color"] = "Silver"; try { if (keyid != "") { valObj = BLLTable<KM_SUB_STRU>.Factory(conn).GetRowData(KM_SUB_STRU.Attribute.SUB_ID, Request["SUB_ID"]); if(valObj==null) return ; txtSUB_ID.Value = Convert.ToString(valObj.SUB_ID);//Convert.ToString txtSUB_NAME.Value = Convert.ToString(valObj.SUB_NAME);//Convert.ToString txtK_SUB_ID.Value = Convert.ToString(valObj.K_SUB_ID);//Convert.ToString txtSUB_CONTENT.Value = Convert.ToString(valObj.SUB_CONTENT);//Convert.ToString txtSUB_CLASS_ID.Value = Convert.ToString(valObj.SUB_CLASS_ID);//Convert.ToString txtSUB_EA_SIGN.Value = Convert.ToString(valObj.SUB_EA_SIGN);//Convert.ToString txtSUB_AUTHOR.Value = Convert.ToString(valObj.SUB_AUTHOR);//Convert.ToString txtSUB_IS_READ.Value = Convert.ToString(valObj.SUB_IS_READ);//Convert.ToString txtSORT_NO.Value = Convert.ToString(valObj.SORT_NO);//Convert.ToDecimal txtIDPATH.Value = Convert.ToString(valObj.IDPATH);//Convert.ToString txtKNAME.Value = Convert.ToString(valObj.KNAME);//Convert.ToString txtSNAME.Value = Convert.ToString(valObj.SNAME);//Convert.ToString txtRNAME.Value = Convert.ToString(valObj.RNAME);//Convert.ToString txtSUB_NUM.Value = Convert.ToString(valObj.SUB_NUM);//Convert.ToDecimal txtSUBOBJECT_NUM.Value = Convert.ToString(valObj.SUBOBJECT_NUM);//Convert.ToDecimal txtUSE_FLAG.Value = Convert.ToString(valObj.USE_FLAG);//Convert.ToString txtEXP1.Value = Convert.ToString(valObj.EXP1);//Convert.ToString txtEXP2.Value = Convert.ToString(valObj.EXP2);//Convert.ToString txtEXP3.Value = Convert.ToString(valObj.EXP3);//Convert.ToString txtEXP4.Value = Convert.ToString(valObj.EXP4);//Convert.ToString } } catch (Exception ex) { litWarn.Text = ex.Message; } } }
protected void Page_Load(object sender, EventArgs e) { title = valObj._ZhName + "��ϸ"; Page.Title = title; if (!IsPostBack) { try { if (!string.IsNullOrEmpty(Request["SUB_ID"])) { valObj = BLLTable<KM_SUB_STRU>.Factory(conn).GetRowData(KM_SUB_STRU.Attribute.SUB_ID, Request["SUB_ID"]); if(valObj==null) return ; txtSUB_ID.Text = Convert.ToString(valObj.SUB_ID);//Convert.ToString txtSUB_NAME.Text = Convert.ToString(valObj.SUB_NAME);//Convert.ToString txtK_SUB_ID.Text = Convert.ToString(valObj.K_SUB_ID);//Convert.ToString txtSUB_CONTENT.Text = Convert.ToString(valObj.SUB_CONTENT);//Convert.ToString txtSUB_CLASS_ID.Text = Convert.ToString(valObj.SUB_CLASS_ID);//Convert.ToString txtSUB_EA_SIGN.Text = Convert.ToString(valObj.SUB_EA_SIGN);//Convert.ToString txtSUB_AUTHOR.Text = Convert.ToString(valObj.SUB_AUTHOR);//Convert.ToString txtSUB_IS_READ.Text = Convert.ToString(valObj.SUB_IS_READ);//Convert.ToString txtSORT_NO.Text = Convert.ToString(valObj.SORT_NO);//Convert.ToDecimal txtIDPATH.Text = Convert.ToString(valObj.IDPATH);//Convert.ToString txtKNAME.Text = Convert.ToString(valObj.KNAME);//Convert.ToString txtSNAME.Text = Convert.ToString(valObj.SNAME);//Convert.ToString txtRNAME.Text = Convert.ToString(valObj.RNAME);//Convert.ToString txtSUB_NUM.Text = Convert.ToString(valObj.SUB_NUM);//Convert.ToDecimal txtSUBOBJECT_NUM.Text = Convert.ToString(valObj.SUBOBJECT_NUM);//Convert.ToDecimal txtUSE_FLAG.Text = Convert.ToString(valObj.USE_FLAG);//Convert.ToString txtEXP1.Text = Convert.ToString(valObj.EXP1);//Convert.ToString txtEXP2.Text = Convert.ToString(valObj.EXP2);//Convert.ToString txtEXP3.Text = Convert.ToString(valObj.EXP3);//Convert.ToString txtEXP4.Text = Convert.ToString(valObj.EXP4);//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 btnFind_Click(object sender, EventArgs e) { try { condObj = new KM_SUB_STRU(); if (txtSUB_ID.Value != "") { condObj.Like(KM_SUB_STRU.Attribute.SUB_ID, Convert.ToString(txtSUB_ID.Value)); } if (txtSUB_NAME.Value != "") { condObj.Like(KM_SUB_STRU.Attribute.SUB_NAME, Convert.ToString(txtSUB_NAME.Value)); } if (txtK_SUB_ID.Value != "") { condObj.Like(KM_SUB_STRU.Attribute.K_SUB_ID, Convert.ToString(txtK_SUB_ID.Value)); } if (txtSUB_CONTENT.Value != "") { condObj.Like(KM_SUB_STRU.Attribute.SUB_CONTENT, Convert.ToString(txtSUB_CONTENT.Value)); } if (txtSUB_CLASS_ID.Value != "") { condObj.Like(KM_SUB_STRU.Attribute.SUB_CLASS_ID, Convert.ToString(txtSUB_CLASS_ID.Value)); } if (txtSUB_EA_SIGN.Value != "") { condObj.Like(KM_SUB_STRU.Attribute.SUB_EA_SIGN, Convert.ToString(txtSUB_EA_SIGN.Value)); } if (txtSUB_AUTHOR.Value != "") { condObj.Like(KM_SUB_STRU.Attribute.SUB_AUTHOR, Convert.ToString(txtSUB_AUTHOR.Value)); } if (txtSUB_IS_READ.Value != "") { condObj.Like(KM_SUB_STRU.Attribute.SUB_IS_READ, Convert.ToString(txtSUB_IS_READ.Value)); } if (txtSORT_NO.Value != "") { condObj.Like(KM_SUB_STRU.Attribute.SORT_NO, Convert.ToDecimal(txtSORT_NO.Value)); } if (txtIDPATH.Value != "") { condObj.Like(KM_SUB_STRU.Attribute.IDPATH, Convert.ToString(txtIDPATH.Value)); } if (txtKNAME.Value != "") { condObj.Like(KM_SUB_STRU.Attribute.KNAME, Convert.ToString(txtKNAME.Value)); } if (txtSNAME.Value != "") { condObj.Like(KM_SUB_STRU.Attribute.SNAME, Convert.ToString(txtSNAME.Value)); } if (txtRNAME.Value != "") { condObj.Like(KM_SUB_STRU.Attribute.RNAME, Convert.ToString(txtRNAME.Value)); } if (txtSUB_NUM.Value != "") { condObj.Like(KM_SUB_STRU.Attribute.SUB_NUM, Convert.ToDecimal(txtSUB_NUM.Value)); } if (txtSUBOBJECT_NUM.Value != "") { condObj.Like(KM_SUB_STRU.Attribute.SUBOBJECT_NUM, Convert.ToDecimal(txtSUBOBJECT_NUM.Value)); } if (txtUSE_FLAG.Value != "") { condObj.Like(KM_SUB_STRU.Attribute.USE_FLAG, Convert.ToString(txtUSE_FLAG.Value)); } if (txtEXP1.Value != "") { condObj.Like(KM_SUB_STRU.Attribute.EXP1, Convert.ToString(txtEXP1.Value)); } if (txtEXP2.Value != "") { condObj.Like(KM_SUB_STRU.Attribute.EXP2, Convert.ToString(txtEXP2.Value)); } if (txtEXP3.Value != "") { condObj.Like(KM_SUB_STRU.Attribute.EXP3, Convert.ToString(txtEXP3.Value)); } if (txtEXP4.Value != "") { condObj.Like(KM_SUB_STRU.Attribute.EXP4, Convert.ToString(txtEXP4.Value)); } listObj = BLLTable <KM_SUB_STRU> .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 btnSetPageNum_Click(object sender, EventArgs e) { aspPager.PageSize = int.Parse(txtPageNum.Value); if (hidCondition.Value != "") { condObj = JsonServiceBase.FromJson<KM_SUB_STRU>(hidCondition.Value); } BindList(condObj, aspPager.CurrentPageIndex); }
private void BindList(KM_SUB_STRU condObj, int curPage) { if (condObj.af_PageByAttributeItem == null)//����������û�����ķ�ҳ�������ԣ����������������� condObj.af_PageBy(KM_SUB_STRU.Attribute.SUB_ID, Order.Desc); listObj = BLLTable<KM_SUB_STRU>.Factory(conn).SelectByPage(valObj, condObj, aspPager.PageSize, curPage, ref recount); repList.DataSource = listObj; repList.DataBind(); aspPager.RecordCount = recount; }
protected void btnOK_Click(object sender, EventArgs e) { try { KM_SUB_STRU valObj = new KM_SUB_STRU(); if(txtSUB_ID.Value !="" ) valObj.SUB_ID = Convert.ToString(txtSUB_ID.Value); if(txtSUB_NAME.Value !="" ) valObj.SUB_NAME = Convert.ToString(txtSUB_NAME.Value); if(txtK_SUB_ID.Value !="" ) valObj.K_SUB_ID = Convert.ToString(txtK_SUB_ID.Value); if(txtSUB_CONTENT.Value !="" ) valObj.SUB_CONTENT = Convert.ToString(txtSUB_CONTENT.Value); if(txtSUB_CLASS_ID.Value !="" ) valObj.SUB_CLASS_ID = Convert.ToString(txtSUB_CLASS_ID.Value); if(txtSUB_EA_SIGN.Value !="" ) valObj.SUB_EA_SIGN = Convert.ToString(txtSUB_EA_SIGN.Value); if(txtSUB_AUTHOR.Value !="" ) valObj.SUB_AUTHOR = Convert.ToString(txtSUB_AUTHOR.Value); if(txtSUB_IS_READ.Value !="" ) valObj.SUB_IS_READ = Convert.ToString(txtSUB_IS_READ.Value); if(txtSORT_NO.Value !="" ) valObj.SORT_NO = Convert.ToDecimal(txtSORT_NO.Value); if(txtIDPATH.Value !="" ) valObj.IDPATH = Convert.ToString(txtIDPATH.Value); if(txtKNAME.Value !="" ) valObj.KNAME = Convert.ToString(txtKNAME.Value); if(txtSNAME.Value !="" ) valObj.SNAME = Convert.ToString(txtSNAME.Value); if(txtRNAME.Value !="" ) valObj.RNAME = Convert.ToString(txtRNAME.Value); if(txtSUB_NUM.Value !="" ) valObj.SUB_NUM = Convert.ToDecimal(txtSUB_NUM.Value); if(txtSUBOBJECT_NUM.Value !="" ) valObj.SUBOBJECT_NUM = Convert.ToDecimal(txtSUBOBJECT_NUM.Value); if(txtUSE_FLAG.Value !="" ) valObj.USE_FLAG = Convert.ToString(txtUSE_FLAG.Value); if(txtEXP1.Value !="" ) valObj.EXP1 = Convert.ToString(txtEXP1.Value); if(txtEXP2.Value !="" ) valObj.EXP2 = Convert.ToString(txtEXP2.Value); if(txtEXP3.Value !="" ) valObj.EXP3 = Convert.ToString(txtEXP3.Value); if(txtEXP4.Value !="" ) valObj.EXP4 = Convert.ToString(txtEXP4.Value); if (keyid != "") { valObj.SUB_ID = keyid; count = BLLTable<KM_SUB_STRU>.Factory(conn).Update(valObj, KM_SUB_STRU.Attribute.SUB_ID); } else { count = BLLTable<KM_SUB_STRU>.Factory(conn).Insert(valObj, KM_SUB_STRU.Attribute.SUB_ID); keyid = valObj.SUB_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("})"); ScriptManager.RegisterStartupScript(Page, this.GetType(), "goto", "if (window.opener){window.opener.returnValue = '" + sbData.ToString() + "';}else{window.returnValue = '" + sbData.ToString() + "';}window.close();", true); } } catch (Exception ex) { litWarn.Text = ex.Message; } }
protected void btnFind_Click(object sender, EventArgs e) { condObj = new KM_SUB_STRU(); if(txtSUB_ID.Value !="" ) condObj.Like(KM_SUB_STRU.Attribute.SUB_ID, Convert.ToString(txtSUB_ID.Value)); if(txtSUB_NAME.Value !="" ) condObj.Like(KM_SUB_STRU.Attribute.SUB_NAME, Convert.ToString(txtSUB_NAME.Value)); if(txtK_SUB_ID.Value !="" ) condObj.Like(KM_SUB_STRU.Attribute.K_SUB_ID, Convert.ToString(txtK_SUB_ID.Value)); if(txtSUB_CONTENT.Value !="" ) condObj.Like(KM_SUB_STRU.Attribute.SUB_CONTENT, Convert.ToString(txtSUB_CONTENT.Value)); if(txtSUB_CLASS_ID.Value !="" ) condObj.Like(KM_SUB_STRU.Attribute.SUB_CLASS_ID, Convert.ToString(txtSUB_CLASS_ID.Value)); if(txtSUB_EA_SIGN.Value !="" ) condObj.Like(KM_SUB_STRU.Attribute.SUB_EA_SIGN, Convert.ToString(txtSUB_EA_SIGN.Value)); if(txtSUB_AUTHOR.Value !="" ) condObj.Like(KM_SUB_STRU.Attribute.SUB_AUTHOR, Convert.ToString(txtSUB_AUTHOR.Value)); if(txtSUB_IS_READ.Value !="" ) condObj.Like(KM_SUB_STRU.Attribute.SUB_IS_READ, Convert.ToString(txtSUB_IS_READ.Value)); if(txtSORT_NO.Value !="" ) condObj.Like(KM_SUB_STRU.Attribute.SORT_NO, Convert.ToDecimal(txtSORT_NO.Value)); if(txtIDPATH.Value !="" ) condObj.Like(KM_SUB_STRU.Attribute.IDPATH, Convert.ToString(txtIDPATH.Value)); if(txtKNAME.Value !="" ) condObj.Like(KM_SUB_STRU.Attribute.KNAME, Convert.ToString(txtKNAME.Value)); if(txtSNAME.Value !="" ) condObj.Like(KM_SUB_STRU.Attribute.SNAME, Convert.ToString(txtSNAME.Value)); if(txtRNAME.Value !="" ) condObj.Like(KM_SUB_STRU.Attribute.RNAME, Convert.ToString(txtRNAME.Value)); if(txtSUB_NUM.Value !="" ) condObj.Like(KM_SUB_STRU.Attribute.SUB_NUM, Convert.ToDecimal(txtSUB_NUM.Value)); if(txtSUBOBJECT_NUM.Value !="" ) condObj.Like(KM_SUB_STRU.Attribute.SUBOBJECT_NUM, Convert.ToDecimal(txtSUBOBJECT_NUM.Value)); if(txtUSE_FLAG.Value !="" ) condObj.Like(KM_SUB_STRU.Attribute.USE_FLAG, Convert.ToString(txtUSE_FLAG.Value)); if(txtEXP1.Value !="" ) condObj.Like(KM_SUB_STRU.Attribute.EXP1, Convert.ToString(txtEXP1.Value)); if(txtEXP2.Value !="" ) condObj.Like(KM_SUB_STRU.Attribute.EXP2, Convert.ToString(txtEXP2.Value)); if(txtEXP3.Value !="" ) condObj.Like(KM_SUB_STRU.Attribute.EXP3, Convert.ToString(txtEXP3.Value)); if(txtEXP4.Value !="" ) condObj.Like(KM_SUB_STRU.Attribute.EXP4, Convert.ToString(txtEXP4.Value)); hidCondition.Value = condObj.ToJson(20); BindList(condObj, 1); }
protected void Page_Load(object sender, EventArgs e) { title = valObj._ZhName + "±à¼"; Page.Title = title; if (!string.IsNullOrEmpty(Request["SUB_ID"])) { keyid = Request["SUB_ID"]; } if (!IsPostBack) { this.txtSUB_ID.Attributes["readonly"] = "readonly"; this.txtSUB_ID.Attributes["disabled"] = "disabled"; this.txtSUB_ID.Style["background-color"] = "Silver"; try { if (keyid != "") { valObj = BLLTable <KM_SUB_STRU> .Factory(conn).GetRowData(KM_SUB_STRU.Attribute.SUB_ID, Request["SUB_ID"]); if (valObj == null) { return; } txtSUB_ID.Value = Convert.ToString(valObj.SUB_ID); //Convert.ToString txtSUB_NAME.Value = Convert.ToString(valObj.SUB_NAME); //Convert.ToString txtK_SUB_ID.Value = Convert.ToString(valObj.K_SUB_ID); //Convert.ToString txtSUB_CONTENT.Value = Convert.ToString(valObj.SUB_CONTENT); //Convert.ToString txtSUB_CLASS_ID.Value = Convert.ToString(valObj.SUB_CLASS_ID); //Convert.ToString txtSUB_EA_SIGN.Value = Convert.ToString(valObj.SUB_EA_SIGN); //Convert.ToString txtSUB_AUTHOR.Value = Convert.ToString(valObj.SUB_AUTHOR); //Convert.ToString txtSUB_IS_READ.Value = Convert.ToString(valObj.SUB_IS_READ); //Convert.ToString txtSORT_NO.Value = Convert.ToString(valObj.SORT_NO); //Convert.ToDecimal txtIDPATH.Value = Convert.ToString(valObj.IDPATH); //Convert.ToString txtKNAME.Value = Convert.ToString(valObj.KNAME); //Convert.ToString txtSNAME.Value = Convert.ToString(valObj.SNAME); //Convert.ToString txtRNAME.Value = Convert.ToString(valObj.RNAME); //Convert.ToString txtSUB_NUM.Value = Convert.ToString(valObj.SUB_NUM); //Convert.ToDecimal txtSUBOBJECT_NUM.Value = Convert.ToString(valObj.SUBOBJECT_NUM); //Convert.ToDecimal txtUSE_FLAG.Value = Convert.ToString(valObj.USE_FLAG); //Convert.ToString txtEXP1.Value = Convert.ToString(valObj.EXP1); //Convert.ToString txtEXP2.Value = Convert.ToString(valObj.EXP2); //Convert.ToString txtEXP3.Value = Convert.ToString(valObj.EXP3); //Convert.ToString txtEXP4.Value = Convert.ToString(valObj.EXP4); //Convert.ToString } } catch (Exception ex) { litWarn.Text = ex.Message; } } }
protected void btnFind_Click(object sender, EventArgs e) { try { condObj = new KM_SUB_STRU(); if(txtSUB_ID.Value !="" ) condObj.Like(KM_SUB_STRU.Attribute.SUB_ID, Convert.ToString(txtSUB_ID.Value)); if(txtSUB_NAME.Value !="" ) condObj.Like(KM_SUB_STRU.Attribute.SUB_NAME, Convert.ToString(txtSUB_NAME.Value)); if(txtK_SUB_ID.Value !="" ) condObj.Like(KM_SUB_STRU.Attribute.K_SUB_ID, Convert.ToString(txtK_SUB_ID.Value)); if(txtSUB_CONTENT.Value !="" ) condObj.Like(KM_SUB_STRU.Attribute.SUB_CONTENT, Convert.ToString(txtSUB_CONTENT.Value)); if(txtSUB_CLASS_ID.Value !="" ) condObj.Like(KM_SUB_STRU.Attribute.SUB_CLASS_ID, Convert.ToString(txtSUB_CLASS_ID.Value)); if(txtSUB_EA_SIGN.Value !="" ) condObj.Like(KM_SUB_STRU.Attribute.SUB_EA_SIGN, Convert.ToString(txtSUB_EA_SIGN.Value)); if(txtSUB_AUTHOR.Value !="" ) condObj.Like(KM_SUB_STRU.Attribute.SUB_AUTHOR, Convert.ToString(txtSUB_AUTHOR.Value)); if(txtSUB_IS_READ.Value !="" ) condObj.Like(KM_SUB_STRU.Attribute.SUB_IS_READ, Convert.ToString(txtSUB_IS_READ.Value)); if(txtSORT_NO.Value !="" ) condObj.Like(KM_SUB_STRU.Attribute.SORT_NO, Convert.ToDecimal(txtSORT_NO.Value)); if(txtIDPATH.Value !="" ) condObj.Like(KM_SUB_STRU.Attribute.IDPATH, Convert.ToString(txtIDPATH.Value)); if(txtKNAME.Value !="" ) condObj.Like(KM_SUB_STRU.Attribute.KNAME, Convert.ToString(txtKNAME.Value)); if(txtSNAME.Value !="" ) condObj.Like(KM_SUB_STRU.Attribute.SNAME, Convert.ToString(txtSNAME.Value)); if(txtRNAME.Value !="" ) condObj.Like(KM_SUB_STRU.Attribute.RNAME, Convert.ToString(txtRNAME.Value)); if(txtSUB_NUM.Value !="" ) condObj.Like(KM_SUB_STRU.Attribute.SUB_NUM, Convert.ToDecimal(txtSUB_NUM.Value)); if(txtSUBOBJECT_NUM.Value !="" ) condObj.Like(KM_SUB_STRU.Attribute.SUBOBJECT_NUM, Convert.ToDecimal(txtSUBOBJECT_NUM.Value)); if(txtUSE_FLAG.Value !="" ) condObj.Like(KM_SUB_STRU.Attribute.USE_FLAG, Convert.ToString(txtUSE_FLAG.Value)); if(txtEXP1.Value !="" ) condObj.Like(KM_SUB_STRU.Attribute.EXP1, Convert.ToString(txtEXP1.Value)); if(txtEXP2.Value !="" ) condObj.Like(KM_SUB_STRU.Attribute.EXP2, Convert.ToString(txtEXP2.Value)); if(txtEXP3.Value !="" ) condObj.Like(KM_SUB_STRU.Attribute.EXP3, Convert.ToString(txtEXP3.Value)); if(txtEXP4.Value !="" ) condObj.Like(KM_SUB_STRU.Attribute.EXP4, Convert.ToString(txtEXP4.Value)); listObj = BLLTable<KM_SUB_STRU>.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 { KM_SUB_STRU valObj = new KM_SUB_STRU(); if (txtSUB_ID.Value != "") { valObj.SUB_ID = Convert.ToString(txtSUB_ID.Value); } if (txtSUB_NAME.Value != "") { valObj.SUB_NAME = Convert.ToString(txtSUB_NAME.Value); } if (txtK_SUB_ID.Value != "") { valObj.K_SUB_ID = Convert.ToString(txtK_SUB_ID.Value); } if (txtSUB_CONTENT.Value != "") { valObj.SUB_CONTENT = Convert.ToString(txtSUB_CONTENT.Value); } if (txtSUB_CLASS_ID.Value != "") { valObj.SUB_CLASS_ID = Convert.ToString(txtSUB_CLASS_ID.Value); } if (txtSUB_EA_SIGN.Value != "") { valObj.SUB_EA_SIGN = Convert.ToString(txtSUB_EA_SIGN.Value); } if (txtSUB_AUTHOR.Value != "") { valObj.SUB_AUTHOR = Convert.ToString(txtSUB_AUTHOR.Value); } if (txtSUB_IS_READ.Value != "") { valObj.SUB_IS_READ = Convert.ToString(txtSUB_IS_READ.Value); } if (txtSORT_NO.Value != "") { valObj.SORT_NO = Convert.ToDecimal(txtSORT_NO.Value); } if (txtIDPATH.Value != "") { valObj.IDPATH = Convert.ToString(txtIDPATH.Value); } if (txtKNAME.Value != "") { valObj.KNAME = Convert.ToString(txtKNAME.Value); } if (txtSNAME.Value != "") { valObj.SNAME = Convert.ToString(txtSNAME.Value); } if (txtRNAME.Value != "") { valObj.RNAME = Convert.ToString(txtRNAME.Value); } if (txtSUB_NUM.Value != "") { valObj.SUB_NUM = Convert.ToDecimal(txtSUB_NUM.Value); } if (txtSUBOBJECT_NUM.Value != "") { valObj.SUBOBJECT_NUM = Convert.ToDecimal(txtSUBOBJECT_NUM.Value); } if (txtUSE_FLAG.Value != "") { valObj.USE_FLAG = Convert.ToString(txtUSE_FLAG.Value); } if (txtEXP1.Value != "") { valObj.EXP1 = Convert.ToString(txtEXP1.Value); } if (txtEXP2.Value != "") { valObj.EXP2 = Convert.ToString(txtEXP2.Value); } if (txtEXP3.Value != "") { valObj.EXP3 = Convert.ToString(txtEXP3.Value); } if (txtEXP4.Value != "") { valObj.EXP4 = Convert.ToString(txtEXP4.Value); } if (keyid != "") { valObj.SUB_ID = keyid; count = BLLTable <KM_SUB_STRU> .Factory(conn).Update(valObj, KM_SUB_STRU.Attribute.SUB_ID); } else { count = BLLTable <KM_SUB_STRU> .Factory(conn).Insert(valObj, KM_SUB_STRU.Attribute.SUB_ID); keyid = valObj.SUB_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("})"); ScriptManager.RegisterStartupScript(Page, this.GetType(), "goto", "if (window.opener){window.opener.returnValue = '" + sbData.ToString() + "';}else{window.returnValue = '" + sbData.ToString() + "';}window.close();", true); } } catch (Exception ex) { litWarn.Text = ex.Message; } }