protected void aspPager_PageChanged(object sender, EventArgs e)
 {
     if (hidCondition.Value != "")
     {
         condObj = JsonServiceBase.FromJson <KM_PART_STRU>(hidCondition.Value);
     }
     BindList(condObj, aspPager.CurrentPageIndex);
 }
 protected void aspPager_PageChanged(object sender, EventArgs e)
 {
     if (hidCondition.Value != "")
     {
         condObj = JsonServiceBase.FromJson<KM_PART_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_PART_STRU>(hidCondition.Value);
     }
     BindList(condObj, aspPager.CurrentPageIndex);
 }
Пример #4
0
    private void BindList(KM_PART_STRU condObj)
    {
        if (condObj.af_PageByAttributeItem == null)//����������û�����ķ�ҳ�������ԣ�����������������
            condObj.af_PageBy(KM_PART_STRU.Attribute.PART_ID, Order.Desc);

        listObj = BLLTable<KM_PART_STRU>.Factory(conn).Select(valObj, condObj);

        repList.DataSource = listObj;
        repList.DataBind();
    }
Пример #5
0
    private void BindList(KM_PART_STRU condObj)
    {
        if (condObj.af_PageByAttributeItem == null)//如果不存在用户定义的分页排序属性,则用主键属性排序
        {
            condObj.af_PageBy(KM_PART_STRU.Attribute.PART_ID, Order.Desc);
        }

        listObj = BLLTable <KM_PART_STRU> .Factory(conn).Select(valObj, condObj);

        repList.DataSource = listObj;
        repList.DataBind();
    }
    private void BindList(KM_PART_STRU condObj, int curPage)
    {
        if (condObj.af_PageByAttributeItem == null)//如果不存在用户定义的分页排序属性,则用主键属性排序
        {
            condObj.af_PageBy(KM_PART_STRU.Attribute.PART_ID, Order.Desc);
        }
        listObj = BLLTable <KM_PART_STRU> .Factory(conn).SelectByPage(valObj, condObj, aspPager.PageSize, curPage, ref recount);

        repList.DataSource = listObj;
        repList.DataBind();
        aspPager.RecordCount = recount;
    }
Пример #7
0
    protected void aspPager_PageChanged(object sender, EventArgs e)
    {
        try
        {
            if (hidCondition.Value != "")
            {
                condObj = JsonServiceBase.FromJson<KM_PART_STRU>(hidCondition.Value);
            }
            listObj = BLLTable<KM_PART_STRU>.Factory(conn).SelectByPage(valObj, condObj, aspPager.PageSize, aspPager.CurrentPageIndex, ref recount);

            repCus.DataSource = listObj;
            repCus.DataBind();
        }
        catch (Exception ex)
        {
            litWarn.Text = ex.Message;
        }
    }
Пример #8
0
    protected void aspPager_PageChanged(object sender, EventArgs e)
    {
        try
        {
            if (hidCondition.Value != "")
            {
                condObj = JsonServiceBase.FromJson <KM_PART_STRU>(hidCondition.Value);
            }
            listObj = BLLTable <KM_PART_STRU> .Factory(conn).SelectByPage(valObj, condObj, aspPager.PageSize, aspPager.CurrentPageIndex, ref recount);

            repCus.DataSource = listObj;
            repCus.DataBind();
        }
        catch (Exception ex)
        {
            litWarn.Text = ex.Message;
        }
    }
Пример #9
0
    protected void Page_Load(object sender, EventArgs e)
    {
        title      = valObj._ZhName + "±à¼­";
        Page.Title = title;
        if (!string.IsNullOrEmpty(Request["PART_ID"]))
        {
            keyid = Request["PART_ID"];
        }
        if (!IsPostBack)
        {
            this.txtPART_ID.Attributes["readonly"]    = "readonly";
            this.txtPART_ID.Attributes["disabled"]    = "disabled";
            this.txtPART_ID.Style["background-color"] = "Silver";
            try
            {
                if (keyid != "")
                {
                    valObj = BLLTable <KM_PART_STRU> .Factory(conn).GetRowData(KM_PART_STRU.Attribute.PART_ID, Request["PART_ID"]);

                    if (valObj == null)
                    {
                        return;
                    }


                    txtPART_ID.Value = Convert.ToString(valObj.PART_ID);             //Convert.ToString

                    txtPART_NAME.Value = Convert.ToString(valObj.PART_NAME);         //Convert.ToString

                    txtK_PART_ID.Value = Convert.ToString(valObj.K_PART_ID);         //Convert.ToString

                    txtPART_CONTENT.Value = Convert.ToString(valObj.PART_CONTENT);   //Convert.ToString

                    txtPART_CLASS_ID.Value = Convert.ToString(valObj.PART_CLASS_ID); //Convert.ToString

                    txtPART_EA_SIGN.Value = Convert.ToString(valObj.PART_EA_SIGN);   //Convert.ToString

                    txtPART_AUTHOR.Value = Convert.ToString(valObj.PART_AUTHOR);     //Convert.ToString

                    txtPART_IS_READ.Value = Convert.ToString(valObj.PART_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["PART_ID"]))
                {

                    valObj = BLLTable<KM_PART_STRU>.Factory(conn).GetRowData(KM_PART_STRU.Attribute.PART_ID, Request["PART_ID"]);
                    if(valObj==null) return ;

                    txtPART_ID.Text = Convert.ToString(valObj.PART_ID);//Convert.ToString

                    txtPART_NAME.Text = Convert.ToString(valObj.PART_NAME);//Convert.ToString

                    txtK_PART_ID.Text = Convert.ToString(valObj.K_PART_ID);//Convert.ToString

                    txtPART_CONTENT.Text = Convert.ToString(valObj.PART_CONTENT);//Convert.ToString

                    txtPART_CLASS_ID.Text = Convert.ToString(valObj.PART_CLASS_ID);//Convert.ToString

                    txtPART_EA_SIGN.Text = Convert.ToString(valObj.PART_EA_SIGN);//Convert.ToString

                    txtPART_AUTHOR.Text = Convert.ToString(valObj.PART_AUTHOR);//Convert.ToString

                    txtPART_IS_READ.Text = Convert.ToString(valObj.PART_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;
            }
        }
    }
Пример #11
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            KM_PART_STRU objVal  = new KM_PART_STRU();
            KM_PART_STRU objCond = new KM_PART_STRU();
            objCond.K_PART_ID = "0";
            objVal.OrderBy(KM_PART_STRU.Attribute.SORT_NO, Order.Asc);
            List <KM_PART_STRU> lstChnl = BLLTable <KM_PART_STRU> .Factory(conn).Select(objVal, objCond);

            StringBuilder sb = new StringBuilder();
            if (lstChnl.Count > 0)
            {
                sb.Append("<li id=\"root_0\" data=\"{id:'0',pid:'0',sc:0,name:'知识分区管理',ntype:''}\" class=\"root\" exp='2'><div class=\"opened root\"><b></b><em></em><a href=\"#\">知识分区管理</a><a href='DeptManage.aspx'>刷新</a></div>");
                sb.Append("<ul>");
                for (int i = 0; i < lstChnl.Count; i++)
                {
                    StringBuilder sbData = new StringBuilder();
                    string        licls  = "";
                    if (i == lstChnl.Count - 1)
                    {
                        licls = "last";
                    }
                    decimal subcount = 1;// lstChnl[i].SUB_NUM;
                    if (subcount == 0)
                    {
                        if (licls != "")
                        {
                            licls += " ";
                        }
                        licls += "leaf";
                    }
                    if (licls != "")
                    {
                        licls = " class='" + licls + "'";
                    }

                    sbData.Append("{id:'").Append(lstChnl[i].PART_ID.ToString());
                    sbData.Append("',pid:'").Append(lstChnl[i].K_PART_ID).Append("',no:").Append(lstChnl[i].SORT_NO.ToString());
                    sbData.Append(",sc:").Append(subcount.ToString());
                    sbData.Append(",name:'").Append(lstChnl[i].PART_NAME).Append("',ntype:'org'}");

                    sb.Append("<li " + licls + " id='node_" + lstChnl[i].PART_ID + "' data=\"" + sbData.ToString() + "\"><div><b></b><em class='node_org'></em><a href='#'>" + lstChnl[i].PART_NAME + "</a></div></li>");
                }
                sb.Append("</ul></li>");
            }
            else
            {
                sb.Append("<li id=\"root_0\" data=\"{id:'0',pid:'0',sc:0,name:'知识分区管理',ntype:''}\" class=\"root\"><div class='root'><b></b><em></em><a href=\"#\">知识分区管理</a><a href='DeptManage.aspx'>刷新</a></div></li>");
            }
            litChnl.Text = sb.ToString();

            //HR_DEPT objVal = new HR_DEPT();
            //HR_DEPT objCond = new HR_DEPT();
            //objCond.P_DEPT_ID = "0";
            //objVal.OrderBy(HR_DEPT.Attribute.SORT_NO, Order.Asc);
            //List<HR_DEPT> lstChnl = BLLTable<HR_DEPT>.Factory(conn).Select(objVal,objCond);
            //StringBuilder sb = new StringBuilder();
            //if (lstChnl.Count > 0)
            //{
            //    sb.Append("<li id=\"root_0\" data=\"{rid:'0',id:'0',pid:'0',sc:0,name:'部门管理',ntype:''}\" class=\"root\" exp='2'><div class=\"opened root\"><b></b><em></em><a href=\"#\">部门管理</a></div>");
            //    sb.Append("<ul>");
            //    for (int i = 0; i < lstChnl.Count; i++)
            //    {
            //        StringBuilder sbData = new StringBuilder();
            //        string licls = "";
            //        if (i == lstChnl.Count - 1)
            //        {
            //            licls = "last";
            //        }
            //        int subcount = BLLTable<HR_DEPT>.Factory(conn).Select(HR_DEPT.Attribute.P_DEPT_ID, lstChnl[i].DEPT_ID).Count;
            //        //if (subcount == 0)
            //        //{
            //        //    if (licls != "") { licls += " "; }
            //        //    licls += "leaf";
            //        //}
            //        if (licls != "") { licls = " class='" + licls + "'"; }

            //        sbData.Append("{rid:'0',id:'").Append(lstChnl[i].DEPT_ID.ToString());
            //        sbData.Append("',pid:'").Append(lstChnl[i].P_DEPT_ID).Append("',no:").Append(lstChnl[i].SORT_NO.ToString());
            //        sbData.Append(",sc:").Append(subcount.ToString());
            //        sbData.Append(",name:'").Append(lstChnl[i].DEPT_NAME).Append("',ntype:'dept'}");

            //        sb.Append("<li " + licls + " id='node_" + lstChnl[i].DEPT_ID + "' data=\"" + sbData.ToString() + "\"><div><b></b><em class='node_dept'></em><a href='#'>" + lstChnl[i].DEPT_NAME + "</a></div></li>");
            //    }
            //    sb.Append("</ul>");
            //    sb.Append("</li>");
            //}
            //else
            //{
            //    sb.Append("<li id=\"root_0\" data=\"{rid:'0',id:'0',pid:'0',sc:0,name:'部门管理',ntype:''}\" class=\"root\"><div class='root'><b></b><em></em><a href=\"#\">部门管理</a></div></li>");

            //}
            //litChnl.Text = sb.ToString();
        }
    }
Пример #12
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            //��ʾ�ӽڵ�
            if (Request["ShowSubNodes"] != null)
            {
                string nodetype = Request["ntype"];
                StringBuilder sb = new StringBuilder("[");
                string pid = Request["id"];//orgid/deptid/taskid
                if (nodetype == "org")
                {

                    #region
                    KM_PART_STRU obj = new KM_PART_STRU();
                    KM_PART_STRU val = new KM_PART_STRU();
                    obj.K_PART_ID = pid;

                    val.OrderBy(KM_PART_STRU.Attribute.SORT_NO, Order.Asc);
                    List<KM_PART_STRU> lst = BLLTable<KM_PART_STRU>.Factory(conn).Select(val, obj);
                    if (lst.Count != null)
                    {
                        for (int i = 0; i < lst.Count; i++)
                        {
                            if (sb.Length > 2)
                            {
                                sb.Append(",");
                            }
                            decimal subcount = lst[i].SUB_NUM;// lst[i].SUB_NUM > 0 ? lst[i].SUB_NUM : 1;
                            sb.Append("{id:'").Append(lst[i].PART_ID);
                            sb.Append("',pid:'").Append(lst[i].K_PART_ID.ToString()).Append("',no:").Append(lst[i].SORT_NO);
                            sb.Append(",sc:").Append(subcount.ToString());
                            sb.Append(",name:'").Append(lst[i].PART_NAME).Append("',ntype:'org'}");
                        }
                    }
                    #endregion
                }
                if (nodetype == "org" || nodetype == "dept")
                {
                    #region
                    KM_PART_STRU obj = new KM_PART_STRU();
                    KM_PART_STRU val = new KM_PART_STRU();
                    if (nodetype == "org")
                    {
                        obj.PART_ID = pid;
                        obj.K_PART_ID = "0";
                    }
                    else
                    {
                        obj.K_PART_ID = pid;
                    }
                    val.OrderBy(KM_PART_STRU.Attribute.SORT_NO, Order.Asc);

                    List<KM_PART_STRU> lst = BLLTable<KM_PART_STRU>.Factory(conn).Select(val, obj);
                    if (lst.Count > 0)
                    {
                        for (int i = 0; i < lst.Count; i++)
                        {
                            if (sb.Length > 2)
                            {
                                sb.Append(",");
                            }
                            int subcount = BLLTable<KM_PART_STRU>.Factory(conn).Select(KM_PART_STRU.Attribute.K_PART_ID, lst[i].PART_ID).Count;

                            sb.Append("{rid:'").Append(lst[i].K_PART_ID).Append("',id:'").Append(lst[i].PART_ID.ToString());
                            sb.Append("',pid:'").Append(lst[i].K_PART_ID.ToString()).Append("',no:").Append(lst[i].SORT_NO);
                            sb.Append(",sc:").Append(subcount.ToString());
                            sb.Append(",name:'").Append(lst[i].PART_NAME).Append("',ntype:'dept'}");

                        }

                    }
                    #endregion
                }
                sb.Append("]");
                Response.Write(sb.ToString());
            }
            //ɾ��Ⱥ��
            if (Request["DelNodeID"] != null)
            {
                string keyid = Request["id"];
                int re = DeptHelper.DelDept(keyid);// BLLTable<HR_DEPT>.Factory(conn).Delete(HR_DEPT.Attribute.DEPT_ID, keyid);
                Response.Write(re.ToString());
            }
            //�޸����
            if (Request["UpdateSort"] != null)
            {
                string chgid1 = Request["chgid1"];
                string chgsort1 = Request["chgsort1"].ToString();
                string chgid2 = Request["chgid2"];
                string chgsort2 = Request["chgsort2"].ToString();
                try
                {
                    // int re=BllTable.UpdateCol(sys_ModuleInfo.Attribute.SortNum, chgsort1, sys_ModuleInfo.Attribute.ModuleID, chgid1, 1);
                    //re=BllTable.UpdateCol(sys_ModuleInfo.Attribute.SortNum, chgsort2, sys_ModuleInfo.Attribute.ModuleID, chgid2, 1);
                    int re = BLLTable<KM_PART_STRU>.Factory(conn).Update(KM_PART_STRU.Attribute.PART_ID, chgid1, KM_PART_STRU.Attribute.SORT_NO, chgsort1);
                    re = BLLTable<KM_PART_STRU>.Factory(conn).Update(KM_PART_STRU.Attribute.PART_ID, chgid2, KM_PART_STRU.Attribute.SORT_NO, chgsort2);

                    Response.Write(re.ToString());
                }
                catch
                {
                    Response.Write("0");
                }

            }

            Response.End();
        }
    }
Пример #13
0
    protected void Page_Load(object sender, EventArgs e)
    {
        title      = valObj._ZhName + "¸ß¼¶Î¬»¤";
        Page.Title = title;
        if (!IsPostBack)
        {
            try
            {
                if (!string.IsNullOrEmpty(Request["PART_ID"]))
                {
                    valObj = BLLTable <KM_PART_STRU> .Factory(conn).GetRowData(KM_PART_STRU.Attribute.PART_ID, Request["PART_ID"]);

                    if (valObj == null)
                    {
                        return;
                    }


                    txtPART_ID.Text = Convert.ToString(valObj.PART_ID);             //Convert.ToString

                    txtPART_NAME.Text = Convert.ToString(valObj.PART_NAME);         //Convert.ToString

                    txtK_PART_ID.Text = Convert.ToString(valObj.K_PART_ID);         //Convert.ToString

                    txtPART_CONTENT.Text = Convert.ToString(valObj.PART_CONTENT);   //Convert.ToString

                    txtPART_CLASS_ID.Text = Convert.ToString(valObj.PART_CLASS_ID); //Convert.ToString

                    txtPART_EA_SIGN.Text = Convert.ToString(valObj.PART_EA_SIGN);   //Convert.ToString

                    txtPART_AUTHOR.Text = Convert.ToString(valObj.PART_AUTHOR);     //Convert.ToString

                    txtPART_IS_READ.Text = Convert.ToString(valObj.PART_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 btnSetPageNum_Click(object sender, EventArgs e)
 {
     aspPager.PageSize = int.Parse(txtPageNum.Value);
     if (hidCondition.Value != "")
     {
         condObj = JsonServiceBase.FromJson<KM_PART_STRU>(hidCondition.Value);
     }
     BindList(condObj, aspPager.CurrentPageIndex);
 }
Пример #15
0
    protected void btnOK_Click(object sender, EventArgs e)
    {
        try
        {
            KM_PART_STRU valObj = new KM_PART_STRU();

            if(txtPART_ID.Value !="" )
                valObj.PART_ID = Convert.ToString(txtPART_ID.Value);

            if(txtPART_NAME.Value !="" )
                valObj.PART_NAME = Convert.ToString(txtPART_NAME.Value);

            if(txtK_PART_ID.Value !="" )
                valObj.K_PART_ID = Convert.ToString(txtK_PART_ID.Value);

            if(txtPART_CONTENT.Value !="" )
                valObj.PART_CONTENT = Convert.ToString(txtPART_CONTENT.Value);

            if(txtPART_CLASS_ID.Value !="" )
                valObj.PART_CLASS_ID = Convert.ToString(txtPART_CLASS_ID.Value);

            if(txtPART_EA_SIGN.Value !="" )
                valObj.PART_EA_SIGN = Convert.ToString(txtPART_EA_SIGN.Value);

            if(txtPART_AUTHOR.Value !="" )
                valObj.PART_AUTHOR = Convert.ToString(txtPART_AUTHOR.Value);

            if(txtPART_IS_READ.Value !="" )
                valObj.PART_IS_READ = Convert.ToString(txtPART_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.PART_ID = keyid;
                count = BLLTable<KM_PART_STRU>.Factory(conn).Update(valObj, KM_PART_STRU.Attribute.PART_ID);
            }
            else
            {
                count = BLLTable<KM_PART_STRU>.Factory(conn).Insert(valObj, KM_PART_STRU.Attribute.PART_ID);
                keyid = valObj.PART_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;
        }
    }
Пример #16
0
    protected void btnFind_Click(object sender, EventArgs e)
    {
        try
        {
            condObj = new KM_PART_STRU();

            if(txtPART_ID.Value !="" )
                condObj.Like(KM_PART_STRU.Attribute.PART_ID, Convert.ToString(txtPART_ID.Value));

            if(txtPART_NAME.Value !="" )
                condObj.Like(KM_PART_STRU.Attribute.PART_NAME, Convert.ToString(txtPART_NAME.Value));

            if(txtK_PART_ID.Value !="" )
                condObj.Like(KM_PART_STRU.Attribute.K_PART_ID, Convert.ToString(txtK_PART_ID.Value));

            if(txtPART_CONTENT.Value !="" )
                condObj.Like(KM_PART_STRU.Attribute.PART_CONTENT, Convert.ToString(txtPART_CONTENT.Value));

            if(txtPART_CLASS_ID.Value !="" )
                condObj.Like(KM_PART_STRU.Attribute.PART_CLASS_ID, Convert.ToString(txtPART_CLASS_ID.Value));

            if(txtPART_EA_SIGN.Value !="" )
                condObj.Like(KM_PART_STRU.Attribute.PART_EA_SIGN, Convert.ToString(txtPART_EA_SIGN.Value));

            if(txtPART_AUTHOR.Value !="" )
                condObj.Like(KM_PART_STRU.Attribute.PART_AUTHOR, Convert.ToString(txtPART_AUTHOR.Value));

            if(txtPART_IS_READ.Value !="" )
                condObj.Like(KM_PART_STRU.Attribute.PART_IS_READ, Convert.ToString(txtPART_IS_READ.Value));

            if(txtSORT_NO.Value !="" )
                condObj.Like(KM_PART_STRU.Attribute.SORT_NO, Convert.ToDecimal(txtSORT_NO.Value));

            if(txtIDPATH.Value !="" )
                condObj.Like(KM_PART_STRU.Attribute.IDPATH, Convert.ToString(txtIDPATH.Value));

            if(txtKNAME.Value !="" )
                condObj.Like(KM_PART_STRU.Attribute.KNAME, Convert.ToString(txtKNAME.Value));

            if(txtSNAME.Value !="" )
                condObj.Like(KM_PART_STRU.Attribute.SNAME, Convert.ToString(txtSNAME.Value));

            if(txtRNAME.Value !="" )
                condObj.Like(KM_PART_STRU.Attribute.RNAME, Convert.ToString(txtRNAME.Value));

            if(txtSUB_NUM.Value !="" )
                condObj.Like(KM_PART_STRU.Attribute.SUB_NUM, Convert.ToDecimal(txtSUB_NUM.Value));

            if(txtSUBOBJECT_NUM.Value !="" )
                condObj.Like(KM_PART_STRU.Attribute.SUBOBJECT_NUM, Convert.ToDecimal(txtSUBOBJECT_NUM.Value));

            if(txtUSE_FLAG.Value !="" )
                condObj.Like(KM_PART_STRU.Attribute.USE_FLAG, Convert.ToString(txtUSE_FLAG.Value));

            if(txtEXP1.Value !="" )
                condObj.Like(KM_PART_STRU.Attribute.EXP1, Convert.ToString(txtEXP1.Value));

            if(txtEXP2.Value !="" )
                condObj.Like(KM_PART_STRU.Attribute.EXP2, Convert.ToString(txtEXP2.Value));

            if(txtEXP3.Value !="" )
                condObj.Like(KM_PART_STRU.Attribute.EXP3, Convert.ToString(txtEXP3.Value));

            if(txtEXP4.Value !="" )
                condObj.Like(KM_PART_STRU.Attribute.EXP4, Convert.ToString(txtEXP4.Value));

            listObj = BLLTable<KM_PART_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 btnFind_Click(object sender, EventArgs e)
    {
        condObj = new KM_PART_STRU();



        if (txtPART_ID.Value != "")
        {
            condObj.Like(KM_PART_STRU.Attribute.PART_ID, Convert.ToString(txtPART_ID.Value));
        }


        if (txtPART_NAME.Value != "")
        {
            condObj.Like(KM_PART_STRU.Attribute.PART_NAME, Convert.ToString(txtPART_NAME.Value));
        }


        if (txtK_PART_ID.Value != "")
        {
            condObj.Like(KM_PART_STRU.Attribute.K_PART_ID, Convert.ToString(txtK_PART_ID.Value));
        }


        if (txtPART_CONTENT.Value != "")
        {
            condObj.Like(KM_PART_STRU.Attribute.PART_CONTENT, Convert.ToString(txtPART_CONTENT.Value));
        }


        if (txtPART_CLASS_ID.Value != "")
        {
            condObj.Like(KM_PART_STRU.Attribute.PART_CLASS_ID, Convert.ToString(txtPART_CLASS_ID.Value));
        }


        if (txtPART_EA_SIGN.Value != "")
        {
            condObj.Like(KM_PART_STRU.Attribute.PART_EA_SIGN, Convert.ToString(txtPART_EA_SIGN.Value));
        }


        if (txtPART_AUTHOR.Value != "")
        {
            condObj.Like(KM_PART_STRU.Attribute.PART_AUTHOR, Convert.ToString(txtPART_AUTHOR.Value));
        }


        if (txtPART_IS_READ.Value != "")
        {
            condObj.Like(KM_PART_STRU.Attribute.PART_IS_READ, Convert.ToString(txtPART_IS_READ.Value));
        }


        if (txtSORT_NO.Value != "")
        {
            condObj.Like(KM_PART_STRU.Attribute.SORT_NO, Convert.ToDecimal(txtSORT_NO.Value));
        }


        if (txtIDPATH.Value != "")
        {
            condObj.Like(KM_PART_STRU.Attribute.IDPATH, Convert.ToString(txtIDPATH.Value));
        }


        if (txtKNAME.Value != "")
        {
            condObj.Like(KM_PART_STRU.Attribute.KNAME, Convert.ToString(txtKNAME.Value));
        }


        if (txtSNAME.Value != "")
        {
            condObj.Like(KM_PART_STRU.Attribute.SNAME, Convert.ToString(txtSNAME.Value));
        }


        if (txtRNAME.Value != "")
        {
            condObj.Like(KM_PART_STRU.Attribute.RNAME, Convert.ToString(txtRNAME.Value));
        }


        if (txtSUB_NUM.Value != "")
        {
            condObj.Like(KM_PART_STRU.Attribute.SUB_NUM, Convert.ToDecimal(txtSUB_NUM.Value));
        }


        if (txtSUBOBJECT_NUM.Value != "")
        {
            condObj.Like(KM_PART_STRU.Attribute.SUBOBJECT_NUM, Convert.ToDecimal(txtSUBOBJECT_NUM.Value));
        }


        if (txtUSE_FLAG.Value != "")
        {
            condObj.Like(KM_PART_STRU.Attribute.USE_FLAG, Convert.ToString(txtUSE_FLAG.Value));
        }


        if (txtEXP1.Value != "")
        {
            condObj.Like(KM_PART_STRU.Attribute.EXP1, Convert.ToString(txtEXP1.Value));
        }


        if (txtEXP2.Value != "")
        {
            condObj.Like(KM_PART_STRU.Attribute.EXP2, Convert.ToString(txtEXP2.Value));
        }


        if (txtEXP3.Value != "")
        {
            condObj.Like(KM_PART_STRU.Attribute.EXP3, Convert.ToString(txtEXP3.Value));
        }


        if (txtEXP4.Value != "")
        {
            condObj.Like(KM_PART_STRU.Attribute.EXP4, Convert.ToString(txtEXP4.Value));
        }

        hidCondition.Value = condObj.ToJson(20);

        BindList(condObj, 1);
    }
Пример #18
0
    protected void btnFind_Click(object sender, EventArgs e)
    {
        try
        {
            condObj = new KM_PART_STRU();



            if (txtPART_ID.Value != "")
            {
                condObj.Like(KM_PART_STRU.Attribute.PART_ID, Convert.ToString(txtPART_ID.Value));
            }


            if (txtPART_NAME.Value != "")
            {
                condObj.Like(KM_PART_STRU.Attribute.PART_NAME, Convert.ToString(txtPART_NAME.Value));
            }


            if (txtK_PART_ID.Value != "")
            {
                condObj.Like(KM_PART_STRU.Attribute.K_PART_ID, Convert.ToString(txtK_PART_ID.Value));
            }


            if (txtPART_CONTENT.Value != "")
            {
                condObj.Like(KM_PART_STRU.Attribute.PART_CONTENT, Convert.ToString(txtPART_CONTENT.Value));
            }


            if (txtPART_CLASS_ID.Value != "")
            {
                condObj.Like(KM_PART_STRU.Attribute.PART_CLASS_ID, Convert.ToString(txtPART_CLASS_ID.Value));
            }


            if (txtPART_EA_SIGN.Value != "")
            {
                condObj.Like(KM_PART_STRU.Attribute.PART_EA_SIGN, Convert.ToString(txtPART_EA_SIGN.Value));
            }


            if (txtPART_AUTHOR.Value != "")
            {
                condObj.Like(KM_PART_STRU.Attribute.PART_AUTHOR, Convert.ToString(txtPART_AUTHOR.Value));
            }


            if (txtPART_IS_READ.Value != "")
            {
                condObj.Like(KM_PART_STRU.Attribute.PART_IS_READ, Convert.ToString(txtPART_IS_READ.Value));
            }


            if (txtSORT_NO.Value != "")
            {
                condObj.Like(KM_PART_STRU.Attribute.SORT_NO, Convert.ToDecimal(txtSORT_NO.Value));
            }


            if (txtIDPATH.Value != "")
            {
                condObj.Like(KM_PART_STRU.Attribute.IDPATH, Convert.ToString(txtIDPATH.Value));
            }


            if (txtKNAME.Value != "")
            {
                condObj.Like(KM_PART_STRU.Attribute.KNAME, Convert.ToString(txtKNAME.Value));
            }


            if (txtSNAME.Value != "")
            {
                condObj.Like(KM_PART_STRU.Attribute.SNAME, Convert.ToString(txtSNAME.Value));
            }


            if (txtRNAME.Value != "")
            {
                condObj.Like(KM_PART_STRU.Attribute.RNAME, Convert.ToString(txtRNAME.Value));
            }


            if (txtSUB_NUM.Value != "")
            {
                condObj.Like(KM_PART_STRU.Attribute.SUB_NUM, Convert.ToDecimal(txtSUB_NUM.Value));
            }


            if (txtSUBOBJECT_NUM.Value != "")
            {
                condObj.Like(KM_PART_STRU.Attribute.SUBOBJECT_NUM, Convert.ToDecimal(txtSUBOBJECT_NUM.Value));
            }


            if (txtUSE_FLAG.Value != "")
            {
                condObj.Like(KM_PART_STRU.Attribute.USE_FLAG, Convert.ToString(txtUSE_FLAG.Value));
            }


            if (txtEXP1.Value != "")
            {
                condObj.Like(KM_PART_STRU.Attribute.EXP1, Convert.ToString(txtEXP1.Value));
            }


            if (txtEXP2.Value != "")
            {
                condObj.Like(KM_PART_STRU.Attribute.EXP2, Convert.ToString(txtEXP2.Value));
            }


            if (txtEXP3.Value != "")
            {
                condObj.Like(KM_PART_STRU.Attribute.EXP3, Convert.ToString(txtEXP3.Value));
            }


            if (txtEXP4.Value != "")
            {
                condObj.Like(KM_PART_STRU.Attribute.EXP4, Convert.ToString(txtEXP4.Value));
            }

            listObj = BLLTable <KM_PART_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;
    }
Пример #19
0
    protected void Page_Load(object sender, EventArgs e)
    {
        title = valObj._ZhName + "��ϸ";
        Page.Title = title;
        if (!IsPostBack)
        {
            try
            {
                if (!string.IsNullOrEmpty(Request["PART_ID"]))
                {

                    valObj = BLLTable<KM_PART_STRU>.Factory(conn).GetRowData(KM_PART_STRU.Attribute.PART_ID, Request["PART_ID"]);
                    if(valObj==null) return ;

                    txtPART_ID.Text = Convert.ToString(valObj.PART_ID);//Convert.ToString

                    txtPART_NAME.Text = Convert.ToString(valObj.PART_NAME);//Convert.ToString

                    txtK_PART_ID.Text = Convert.ToString(valObj.K_PART_ID);//Convert.ToString

                    txtPART_CONTENT.Text = Convert.ToString(valObj.PART_CONTENT);//Convert.ToString

                    txtPART_CLASS_ID.Text = Convert.ToString(valObj.PART_CLASS_ID);//Convert.ToString

                    txtPART_EA_SIGN.Text = Convert.ToString(valObj.PART_EA_SIGN);//Convert.ToString

                    txtPART_AUTHOR.Text = Convert.ToString(valObj.PART_AUTHOR);//Convert.ToString

                    txtPART_IS_READ.Text = Convert.ToString(valObj.PART_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)
    {
        condObj = new KM_PART_STRU();

        if(txtPART_ID.Value !="" )
            condObj.Like(KM_PART_STRU.Attribute.PART_ID, Convert.ToString(txtPART_ID.Value));

        if(txtPART_NAME.Value !="" )
            condObj.Like(KM_PART_STRU.Attribute.PART_NAME, Convert.ToString(txtPART_NAME.Value));

        if(txtK_PART_ID.Value !="" )
            condObj.Like(KM_PART_STRU.Attribute.K_PART_ID, Convert.ToString(txtK_PART_ID.Value));

        if(txtPART_CONTENT.Value !="" )
            condObj.Like(KM_PART_STRU.Attribute.PART_CONTENT, Convert.ToString(txtPART_CONTENT.Value));

        if(txtPART_CLASS_ID.Value !="" )
            condObj.Like(KM_PART_STRU.Attribute.PART_CLASS_ID, Convert.ToString(txtPART_CLASS_ID.Value));

        if(txtPART_EA_SIGN.Value !="" )
            condObj.Like(KM_PART_STRU.Attribute.PART_EA_SIGN, Convert.ToString(txtPART_EA_SIGN.Value));

        if(txtPART_AUTHOR.Value !="" )
            condObj.Like(KM_PART_STRU.Attribute.PART_AUTHOR, Convert.ToString(txtPART_AUTHOR.Value));

        if(txtPART_IS_READ.Value !="" )
            condObj.Like(KM_PART_STRU.Attribute.PART_IS_READ, Convert.ToString(txtPART_IS_READ.Value));

        if(txtSORT_NO.Value !="" )
            condObj.Like(KM_PART_STRU.Attribute.SORT_NO, Convert.ToDecimal(txtSORT_NO.Value));

        if(txtIDPATH.Value !="" )
            condObj.Like(KM_PART_STRU.Attribute.IDPATH, Convert.ToString(txtIDPATH.Value));

        if(txtKNAME.Value !="" )
            condObj.Like(KM_PART_STRU.Attribute.KNAME, Convert.ToString(txtKNAME.Value));

        if(txtSNAME.Value !="" )
            condObj.Like(KM_PART_STRU.Attribute.SNAME, Convert.ToString(txtSNAME.Value));

        if(txtRNAME.Value !="" )
            condObj.Like(KM_PART_STRU.Attribute.RNAME, Convert.ToString(txtRNAME.Value));

        if(txtSUB_NUM.Value !="" )
            condObj.Like(KM_PART_STRU.Attribute.SUB_NUM, Convert.ToDecimal(txtSUB_NUM.Value));

        if(txtSUBOBJECT_NUM.Value !="" )
            condObj.Like(KM_PART_STRU.Attribute.SUBOBJECT_NUM, Convert.ToDecimal(txtSUBOBJECT_NUM.Value));

        if(txtUSE_FLAG.Value !="" )
            condObj.Like(KM_PART_STRU.Attribute.USE_FLAG, Convert.ToString(txtUSE_FLAG.Value));

        if(txtEXP1.Value !="" )
            condObj.Like(KM_PART_STRU.Attribute.EXP1, Convert.ToString(txtEXP1.Value));

        if(txtEXP2.Value !="" )
            condObj.Like(KM_PART_STRU.Attribute.EXP2, Convert.ToString(txtEXP2.Value));

        if(txtEXP3.Value !="" )
            condObj.Like(KM_PART_STRU.Attribute.EXP3, Convert.ToString(txtEXP3.Value));

        if(txtEXP4.Value !="" )
            condObj.Like(KM_PART_STRU.Attribute.EXP4, Convert.ToString(txtEXP4.Value));

        hidCondition.Value = condObj.ToJson(20);

        BindList(condObj, 1);
    }
Пример #21
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            //显示子节点
            if (Request["ShowSubNodes"] != null)
            {
                string        nodetype = Request["ntype"];
                StringBuilder sb       = new StringBuilder("[");
                string        pid      = Request["id"];//orgid/deptid/taskid
                if (nodetype == "org")
                {
                    #region
                    KM_PART_STRU obj = new KM_PART_STRU();
                    KM_PART_STRU val = new KM_PART_STRU();
                    obj.K_PART_ID = pid;

                    val.OrderBy(KM_PART_STRU.Attribute.SORT_NO, Order.Asc);
                    List <KM_PART_STRU> lst = BLLTable <KM_PART_STRU> .Factory(conn).Select(val, obj);

                    if (lst.Count != null)
                    {
                        for (int i = 0; i < lst.Count; i++)
                        {
                            if (sb.Length > 2)
                            {
                                sb.Append(",");
                            }
                            decimal subcount = lst[i].SUB_NUM;// lst[i].SUB_NUM > 0 ? lst[i].SUB_NUM : 1;
                            sb.Append("{id:'").Append(lst[i].PART_ID);
                            sb.Append("',pid:'").Append(lst[i].K_PART_ID.ToString()).Append("',no:").Append(lst[i].SORT_NO);
                            sb.Append(",sc:").Append(subcount.ToString());
                            sb.Append(",name:'").Append(lst[i].PART_NAME).Append("',ntype:'org'}");
                        }
                    }
                    #endregion
                }
                if (nodetype == "org" || nodetype == "dept")
                {
                    #region
                    KM_PART_STRU obj = new KM_PART_STRU();
                    KM_PART_STRU val = new KM_PART_STRU();
                    if (nodetype == "org")
                    {
                        obj.PART_ID   = pid;
                        obj.K_PART_ID = "0";
                    }
                    else
                    {
                        obj.K_PART_ID = pid;
                    }
                    val.OrderBy(KM_PART_STRU.Attribute.SORT_NO, Order.Asc);

                    List <KM_PART_STRU> lst = BLLTable <KM_PART_STRU> .Factory(conn).Select(val, obj);

                    if (lst.Count > 0)
                    {
                        for (int i = 0; i < lst.Count; i++)
                        {
                            if (sb.Length > 2)
                            {
                                sb.Append(",");
                            }
                            int subcount = BLLTable <KM_PART_STRU> .Factory(conn).Select(KM_PART_STRU.Attribute.K_PART_ID, lst[i].PART_ID).Count;

                            sb.Append("{rid:'").Append(lst[i].K_PART_ID).Append("',id:'").Append(lst[i].PART_ID.ToString());
                            sb.Append("',pid:'").Append(lst[i].K_PART_ID.ToString()).Append("',no:").Append(lst[i].SORT_NO);
                            sb.Append(",sc:").Append(subcount.ToString());
                            sb.Append(",name:'").Append(lst[i].PART_NAME).Append("',ntype:'dept'}");
                        }
                    }
                    #endregion
                }
                sb.Append("]");
                Response.Write(sb.ToString());
            }
            //删除群组
            if (Request["DelNodeID"] != null)
            {
                string keyid = Request["id"];
                int    re    = DeptHelper.DelDept(keyid);// BLLTable<HR_DEPT>.Factory(conn).Delete(HR_DEPT.Attribute.DEPT_ID, keyid);
                Response.Write(re.ToString());
            }
            //修改序号
            if (Request["UpdateSort"] != null)
            {
                string chgid1   = Request["chgid1"];
                string chgsort1 = Request["chgsort1"].ToString();
                string chgid2   = Request["chgid2"];
                string chgsort2 = Request["chgsort2"].ToString();
                try
                {
                    // int re=BllTable.UpdateCol(sys_ModuleInfo.Attribute.SortNum, chgsort1, sys_ModuleInfo.Attribute.ModuleID, chgid1, 1);
                    //re=BllTable.UpdateCol(sys_ModuleInfo.Attribute.SortNum, chgsort2, sys_ModuleInfo.Attribute.ModuleID, chgid2, 1);
                    int re = BLLTable <KM_PART_STRU> .Factory(conn).Update(KM_PART_STRU.Attribute.PART_ID, chgid1, KM_PART_STRU.Attribute.SORT_NO, chgsort1);

                    re = BLLTable <KM_PART_STRU> .Factory(conn).Update(KM_PART_STRU.Attribute.PART_ID, chgid2, KM_PART_STRU.Attribute.SORT_NO, chgsort2);

                    Response.Write(re.ToString());
                }
                catch
                {
                    Response.Write("0");
                }
            }

            Response.End();
        }
    }
 private void BindList(KM_PART_STRU condObj, int curPage)
 {
     if (condObj.af_PageByAttributeItem == null)//����������û�����ķ�ҳ�������ԣ�����������������
         condObj.af_PageBy(KM_PART_STRU.Attribute.PART_ID, Order.Desc);
     listObj = BLLTable<KM_PART_STRU>.Factory(conn).SelectByPage(valObj, condObj, aspPager.PageSize, curPage, ref recount);
     repList.DataSource = listObj;
     repList.DataBind();
     aspPager.RecordCount = recount;
 }
Пример #23
0
    protected void btnOK_Click(object sender, EventArgs e)
    {
        try
        {
            KM_PART_STRU valObj = new KM_PART_STRU();


            if (txtPART_ID.Value != "")
            {
                valObj.PART_ID = Convert.ToString(txtPART_ID.Value);
            }


            if (txtPART_NAME.Value != "")
            {
                valObj.PART_NAME = Convert.ToString(txtPART_NAME.Value);
            }


            if (txtK_PART_ID.Value != "")
            {
                valObj.K_PART_ID = Convert.ToString(txtK_PART_ID.Value);
            }


            if (txtPART_CONTENT.Value != "")
            {
                valObj.PART_CONTENT = Convert.ToString(txtPART_CONTENT.Value);
            }


            if (txtPART_CLASS_ID.Value != "")
            {
                valObj.PART_CLASS_ID = Convert.ToString(txtPART_CLASS_ID.Value);
            }


            if (txtPART_EA_SIGN.Value != "")
            {
                valObj.PART_EA_SIGN = Convert.ToString(txtPART_EA_SIGN.Value);
            }


            if (txtPART_AUTHOR.Value != "")
            {
                valObj.PART_AUTHOR = Convert.ToString(txtPART_AUTHOR.Value);
            }


            if (txtPART_IS_READ.Value != "")
            {
                valObj.PART_IS_READ = Convert.ToString(txtPART_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.PART_ID = keyid;
                count          = BLLTable <KM_PART_STRU> .Factory(conn).Update(valObj, KM_PART_STRU.Attribute.PART_ID);
            }
            else
            {
                count = BLLTable <KM_PART_STRU> .Factory(conn).Insert(valObj, KM_PART_STRU.Attribute.PART_ID);

                keyid = valObj.PART_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;
        }
    }
Пример #24
0
    protected void Page_Load(object sender, EventArgs e)
    {
        title = valObj._ZhName + "�༭";
        Page.Title = title;
        if (!string.IsNullOrEmpty(Request["PART_ID"]))
        {
            keyid = Request["PART_ID"];
        }
        if (!IsPostBack)
        {

            this.txtPART_ID.Attributes["readonly"] = "readonly";
            this.txtPART_ID.Attributes["disabled"] = "disabled";
            this.txtPART_ID.Style["background-color"] = "Silver";
            try
            {
                if (keyid != "")
                {

                    valObj = BLLTable<KM_PART_STRU>.Factory(conn).GetRowData(KM_PART_STRU.Attribute.PART_ID, Request["PART_ID"]);
                    if(valObj==null) return ;

                    txtPART_ID.Value = Convert.ToString(valObj.PART_ID);//Convert.ToString

                    txtPART_NAME.Value = Convert.ToString(valObj.PART_NAME);//Convert.ToString

                    txtK_PART_ID.Value = Convert.ToString(valObj.K_PART_ID);//Convert.ToString

                    txtPART_CONTENT.Value = Convert.ToString(valObj.PART_CONTENT);//Convert.ToString

                    txtPART_CLASS_ID.Value = Convert.ToString(valObj.PART_CLASS_ID);//Convert.ToString

                    txtPART_EA_SIGN.Value = Convert.ToString(valObj.PART_EA_SIGN);//Convert.ToString

                    txtPART_AUTHOR.Value = Convert.ToString(valObj.PART_AUTHOR);//Convert.ToString

                    txtPART_IS_READ.Value = Convert.ToString(valObj.PART_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)
    {
        if (!IsPostBack)
        {
            KM_PART_STRU objVal = new KM_PART_STRU();
            KM_PART_STRU objCond = new KM_PART_STRU();
            objCond.K_PART_ID = "0";
            objVal.OrderBy(KM_PART_STRU.Attribute.SORT_NO, Order.Asc);
            List<KM_PART_STRU> lstChnl = BLLTable<KM_PART_STRU>.Factory(conn).Select(objVal, objCond);
            StringBuilder sb = new StringBuilder();
            if (lstChnl.Count > 0)
            {
                sb.Append("<li id=\"root_0\" data=\"{id:'0',pid:'0',sc:0,name:'֪ʶ��������',ntype:''}\" class=\"root\" exp='2'><div class=\"opened root\"><b></b><em></em><a href=\"#\">֪ʶ��������</a><a href='DeptManage.aspx'>ˢ��</a></div>");
                sb.Append("<ul>");
                for (int i = 0; i < lstChnl.Count; i++)
                {
                    StringBuilder sbData = new StringBuilder();
                    string licls = "";
                    if (i == lstChnl.Count - 1)
                    {
                        licls = "last";
                    }
                    decimal subcount = 1;// lstChnl[i].SUB_NUM;
                    if (subcount == 0)
                    {
                        if (licls != "") { licls += " "; }
                        licls += "leaf";
                    }
                    if (licls != "") { licls = " class='" + licls + "'"; }

                    sbData.Append("{id:'").Append(lstChnl[i].PART_ID.ToString());
                    sbData.Append("',pid:'").Append(lstChnl[i].K_PART_ID).Append("',no:").Append(lstChnl[i].SORT_NO.ToString());
                    sbData.Append(",sc:").Append(subcount.ToString());
                    sbData.Append(",name:'").Append(lstChnl[i].PART_NAME).Append("',ntype:'org'}");

                    sb.Append("<li " + licls + " id='node_" + lstChnl[i].PART_ID + "' data=\"" + sbData.ToString() + "\"><div><b></b><em class='node_org'></em><a href='#'>" + lstChnl[i].PART_NAME + "</a></div></li>");
                }
                sb.Append("</ul></li>");
            }
            else
            {
                sb.Append("<li id=\"root_0\" data=\"{id:'0',pid:'0',sc:0,name:'֪ʶ��������',ntype:''}\" class=\"root\"><div class='root'><b></b><em></em><a href=\"#\">֪ʶ��������</a><a href='DeptManage.aspx'>ˢ��</a></div></li>");

            }
            litChnl.Text = sb.ToString();

            //HR_DEPT objVal = new HR_DEPT();
            //HR_DEPT objCond = new HR_DEPT();
            //objCond.P_DEPT_ID = "0";
            //objVal.OrderBy(HR_DEPT.Attribute.SORT_NO, Order.Asc);
            //List<HR_DEPT> lstChnl = BLLTable<HR_DEPT>.Factory(conn).Select(objVal,objCond);
            //StringBuilder sb = new StringBuilder();
            //if (lstChnl.Count > 0)
            //{
            //    sb.Append("<li id=\"root_0\" data=\"{rid:'0',id:'0',pid:'0',sc:0,name:'���Ź���',ntype:''}\" class=\"root\" exp='2'><div class=\"opened root\"><b></b><em></em><a href=\"#\">���Ź���</a></div>");
            //    sb.Append("<ul>");
            //    for (int i = 0; i < lstChnl.Count; i++)
            //    {
            //        StringBuilder sbData = new StringBuilder();
            //        string licls = "";
            //        if (i == lstChnl.Count - 1)
            //        {
            //            licls = "last";
            //        }
            //        int subcount = BLLTable<HR_DEPT>.Factory(conn).Select(HR_DEPT.Attribute.P_DEPT_ID, lstChnl[i].DEPT_ID).Count;
            //        //if (subcount == 0)
            //        //{
            //        //    if (licls != "") { licls += " "; }
            //        //    licls += "leaf";
            //        //}
            //        if (licls != "") { licls = " class='" + licls + "'"; }

            //        sbData.Append("{rid:'0',id:'").Append(lstChnl[i].DEPT_ID.ToString());
            //        sbData.Append("',pid:'").Append(lstChnl[i].P_DEPT_ID).Append("',no:").Append(lstChnl[i].SORT_NO.ToString());
            //        sbData.Append(",sc:").Append(subcount.ToString());
            //        sbData.Append(",name:'").Append(lstChnl[i].DEPT_NAME).Append("',ntype:'dept'}");

            //        sb.Append("<li " + licls + " id='node_" + lstChnl[i].DEPT_ID + "' data=\"" + sbData.ToString() + "\"><div><b></b><em class='node_dept'></em><a href='#'>" + lstChnl[i].DEPT_NAME + "</a></div></li>");
            //    }
            //    sb.Append("</ul>");
            //    sb.Append("</li>");
            //}
            //else
            //{
            //    sb.Append("<li id=\"root_0\" data=\"{rid:'0',id:'0',pid:'0',sc:0,name:'���Ź���',ntype:''}\" class=\"root\"><div class='root'><b></b><em></em><a href=\"#\">���Ź���</a></div></li>");

            //}
            //litChnl.Text = sb.ToString();
        }
    }
Пример #26
0
    protected void Page_Load(object sender, EventArgs e)
    {
        title      = valObj._ZhName + "详细";
        Page.Title = title;
        if (!IsPostBack)
        {
            try
            {
                if (!string.IsNullOrEmpty(Request["PART_ID"]))
                {
                    valObj = BLLTable <KM_PART_STRU> .Factory(conn).GetRowData(KM_PART_STRU.Attribute.PART_ID, Request["PART_ID"]);

                    if (valObj == null)
                    {
                        return;
                    }


                    txtPART_ID.Text = Convert.ToString(valObj.PART_ID);//Convert.ToString


                    txtPART_NAME.Text = Convert.ToString(valObj.PART_NAME);//Convert.ToString


                    txtK_PART_ID.Text = Convert.ToString(valObj.K_PART_ID);//Convert.ToString


                    txtPART_CONTENT.Text = Convert.ToString(valObj.PART_CONTENT);//Convert.ToString


                    txtPART_CLASS_ID.Text = Convert.ToString(valObj.PART_CLASS_ID);//Convert.ToString


                    txtPART_EA_SIGN.Text = Convert.ToString(valObj.PART_EA_SIGN);//Convert.ToString


                    txtPART_AUTHOR.Text = Convert.ToString(valObj.PART_AUTHOR);//Convert.ToString


                    txtPART_IS_READ.Text = Convert.ToString(valObj.PART_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();
            }
        }
    }