Ejemplo n.º 1
0
        /// <summary>
        /// 关键字 查询  按工作ID查
        /// </summary>
        /// <returns></returns>
        public string KeySearchByWorkID(string content, string ck)
        {
            int    workid = 0;
            string sql    = "";

            try
            {
                workid = int.Parse(content);
            }
            catch
            {
                //this.Alert("您输入的不是一个WorkID" + content);
                //return;
            }
            if (ck.ToUpper() == "TRUE")
            {
                sql = "SELECT A.*,B.Name as FlowName FROM V_FlowData a,WF_Flow b  WHERE A.FK_Flow=B.No AND A.OID=" + workid + " AND FlowEmps LIKE '%@" + WebUser.No + ",%'";
            }
            else
            {
                sql = "SELECT A.*,B.Name as FlowName FROM V_FlowData a,WF_Flow b  WHERE A.FK_Flow=B.No AND A.OID=" + workid;
            }

            DataTable dt = BP.DA.DBAccess.RunSQLReturnTable(sql);

            return(CommonDbOperator.GetJsonFromTable(dt));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 获取抄送列表
        /// </summary>
        /// <returns></returns>
        private string GetCCList()
        {
            DataTable dt       = null;
            string    strCCSta = getUTF8ToString("ccSta");

            //全部
            if (strCCSta == "all")
            {
                dt = BP.WF.Dev2Interface.DB_CCList(WebUser.No);
            }
            //未读
            if (strCCSta == "unread")
            {
                dt = BP.WF.Dev2Interface.DB_CCList_UnRead(WebUser.No);
            }
            //已读
            if (strCCSta == "isread")
            {
                dt = BP.WF.Dev2Interface.DB_CCList_Read(WebUser.No);
            }
            //删除
            if (strCCSta == "delete")
            {
                dt = BP.WF.Dev2Interface.DB_CCList_Delete(WebUser.No);
            }
            return(CommonDbOperator.GetJsonFromTable(dt));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 改变数据状态 2013.05.23 H
        /// </summary>
        /// <returns></returns>
        public string UpdateMsgSta()
        {
            string myPK = getUTF8ToString("myPK");

            DataTable dt = BP.WF.Dev2Interface.DB_GenerUpdateMsgSta(myPK);

            return(CommonDbOperator.GetJsonFromTable(dt));
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 获取历史发起
        /// </summary>
        /// <returns></returns>
        private string GetHistoryStartFlow()
        {
            string    fk_flow   = getUTF8ToString("FK_FLOW");
            Flow      startFlow = new Flow(fk_flow);
            string    sql       = "SELECT * FROM " + startFlow.PTable + " WHERE FlowStarter='" + WebUser.No + "'";
            DataTable dt        = startFlow.RunSQLReturnTable(sql);

            return(CommonDbOperator.GetJsonFromTable(dt));
        }
Ejemplo n.º 5
0
        /// <summary>
        /// 获取挂起流程
        /// </summary>
        /// <returns></returns>
        private string GetHungUpList()
        {
            DataTable dt = BP.WF.Dev2Interface.DB_GenerHungUpList();

            foreach (DataColumn column in dt.Columns)
            {
                column.ColumnName = column.ColumnName.ToUpper();
            }
            return(CommonDbOperator.GetJsonFromTable(dt));
        }
Ejemplo n.º 6
0
        /// <summary>
        /// 月计划汇总
        /// </summary>
        /// <returns></returns>
        private string MonthPlanCollect()
        {
            string sql = "SELECT a.* ,b.FK_Flow,b.FK_Node,b.FlowName,b.NodeName,b.IsRead,b.Starter,b.ADT,b.SDT,b.WorkID FROM ND22Rpt"
                         + " a , WF_EmpWorks b WHERE a.OID=B.WorkID AND b.WFState not in (7)"
                         + " AND b.FK_Emp='" + WebUser.No + "'"
                         + " ORDER BY ADT DESC";
            DataTable dt = BP.DA.DBAccess.RunSQLReturnTable(sql);

            return(CommonDbOperator.GetJsonFromTable(dt));
        }
Ejemplo n.º 7
0
        /// <summary>
        ///  详细 信息  2013.05.23 H
        /// </summary>
        /// <returns></returns>
        public string GetDetailSms()
        {
            string myPK = getUTF8ToString("myPK");
            string sql  = "";

            sql = "SELECT * FROM Sys_SMS WHERE MyPK='" + myPK + "'";

            DataTable dt = BP.DA.DBAccess.RunSQLReturnTable(sql);

            return(CommonDbOperator.GetJsonFromTable(dt));
        }
Ejemplo n.º 8
0
        /// <summary>
        /// 弹出 窗口  2013.05.23 H
        /// </summary>
        /// <returns></returns>
        public string PopAlert()
        {
            // IsRead = 0 未读
            string type = getUTF8ToString("type");

            DataTable dt = BP.WF.Dev2Interface.DB_GenerPopAlert(type);

            if (dt.Rows.Count >= 1)
            {
                return(CommonDbOperator.GetJsonFromTable(GetNewDataTable(dt)));
            }
            else
            {
                return("");
            }
        }
Ejemplo n.º 9
0
        /// <summary>
        /// 关键字 查询  按流程标题字段关键字查
        /// </summary>
        /// <returns></returns>
        public string KeySearchByTitle(string content, string ck)
        {
            string sql = "";

            if (ck.ToUpper() == "TRUE")
            {
                sql = "SELECT A.*,B.Name as FlowName FROM V_FlowData a,WF_Flow b  WHERE A.FK_Flow=B.No AND a.Title LIKE '%" + content + "%' AND FlowEmps LIKE '%@" + WebUser.No + ",%'";
            }
            else
            {
                sql = "SELECT A.*,B.Name as FlowName FROM V_FlowData a,WF_Flow b  WHERE A.FK_Flow=B.No AND a.Title LIKE '%" + content + "%'";
            }

            DataTable dt = BP.DA.DBAccess.RunSQLReturnTable(sql);

            return(CommonDbOperator.GetJsonFromTable(dt));
        }
Ejemplo n.º 10
0
        /// <summary>
        /// 获取历史流程信息
        /// </summary>
        public string GetStoryHistory()
        {
            string fk_flow = "";

            if (!string.IsNullOrEmpty(Request["FK_Flow"]))
            {
                fk_flow = Request["FK_Flow"].ToString();
            }

            Flow   fl  = new Flow(fk_flow);
            string sql = "";

            sql = "SELECT " + fl.HistoryFields + ",OID,FID FROM " + fl.PTable + " WHERE FlowStarter='" + BP.Web.WebUser.No + "' AND WFState!='" + (int)WFState.Blank + "'" + "    ORDER by OID DESC";

            DataTable dt = BP.DA.DBAccess.RunSQLReturnTable(sql);

            return(CommonDbOperator.GetJsonFromTable(dt));
        }
Ejemplo n.º 11
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));
        }
Ejemplo n.º 12
0
        /// <summary>
        /// 获取待办列表
        /// </summary>
        /// <returns></returns>
        private string GetEmpWorks()
        {
            DataTable dt = BP.WF.Dev2Interface.DB_GenerEmpWorksOfDataTable();

            return(CommonDbOperator.GetJsonFromTable(dt));
        }
Ejemplo n.º 13
0
        /// <summary>
        /// 获取启动流程项
        /// </summary>
        /// <returns></returns>
        private string GetSartFlow()
        {
            DataTable dt = BP.WF.Dev2Interface.DB_GenerCanStartFlowsOfDataTable(WebUser.No);

            return(CommonDbOperator.GetJsonFromTable(dt));
        }