Beispiel #1
0
        public override int RetrieveAllFromDBSource()
        {
            QueryObject qo = new QueryObject(this);

            qo.addOrderBy("No");
            return(qo.DoQuery());
        }
Beispiel #2
0
        /// <summary>
        /// 取回 审批
        /// </summary>
        /// <returns></returns>
        public string Gettask()
        {
            Flows fls = new Flows();

            BP.En.QueryObject qo = new BP.En.QueryObject(fls);
            qo.addOrderBy(FlowAttr.FK_FlowSort);
            qo.DoQuery();

            //将集合 转换为datatable
            DataTable dt = new DataTable("Flows");

            DataColumn dc0 = new DataColumn("No", Type.GetType("System.String"));              //编号
            DataColumn dc1 = new DataColumn("FK_FlowSortText", Type.GetType("System.String")); //流程类别
            DataColumn dc2 = new DataColumn("Name", Type.GetType("System.String"));            //名称
            DataColumn dc3 = new DataColumn("FlowImage", Type.GetType("System.String"));       //流程图
            DataColumn dc4 = new DataColumn("Note", Type.GetType("System.String"));            //描述

            dt.Columns.Add(dc0);
            dt.Columns.Add(dc1);
            dt.Columns.Add(dc2);
            dt.Columns.Add(dc3);
            dt.Columns.Add(dc4);

            foreach (Flow fl in fls)
            {
                DataRow dr = dt.NewRow();

                dr["No"] = fl.No;
                dr["FK_FlowSortText"] = fl.FK_FlowSortText;
                dr["Name"]            = fl.Name;
                dr["FlowImage"]       = fl.No;
                dr["Note"]            = fl.Note;

                dt.Rows.Add(dr);
            }
            //将dt以json的格式 返回
            return(CommonDbOperator.GetJsonFromTable(dt));
        }