Ejemplo n.º 1
0
        /// <summary>
        /// 打印客户洽谈信息
        /// </summary>
        /// <param name="CustID"></param>
        /// <param name="CustTalkM"></param>
        /// <param name="TalkBegin"></param>
        /// <param name="TalkEnd"></param>
        /// <param name="ord"></param>
        /// <returns></returns>
        public static DataTable ExportTalkInfo(string CanUserID, string CustID, CustTalkModel CustTalkM, string TalkBegin, string TalkEnd, string ord)
        {
            // return TalkDBHelper.ExportTalkInfo(CustID, CustTalkM, TalkBegin, TalkEnd, ord);
            string LinkerIds     = ""; //每条记录多个ID
            string EmployeeNames = ""; //多个员工姓名

            DataTable dt = TalkDBHelper.ExportTalkInfo(CanUserID, CustID, CustTalkM, TalkBegin, TalkEnd, ord);

            DataColumn LinkerName = new DataColumn();

            dt.Columns.Add("LinkerName");

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                LinkerIds = dt.Rows[i]["Linker"].ToString();

                string[] LinkerList = LinkerIds.Split(',');

                for (int j = 0; j < LinkerList.Length; j++)
                {
                    //获取参与人ID
                    int inputID = Convert.ToInt32(LinkerList[j]);
                    //调用方法取name
                    EmployeeNames = EmployeeNames + "," + EmployeeDBHelper.GetEmployeeNameByID(inputID, CustTalkM.CompanyCD);
                }

                //插入EmployeeNames到一条记录
                dt.Rows[i]["LinkerName"] = EmployeeNames.Substring(1);
                EmployeeNames            = "";
            }

            return(dt);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 根据ID获得请示详细信息
        /// </summary>
        /// <param name="CompanyCD">公司代码</param>
        /// <param name="DocRequstID">请示ID</param>
        /// <returns>请示信息</returns>
        public static DataTable GetDocRequstByID(string CompanyCD, int DocRequstID)
        {
            //return DocRequstDBHelper.GetDocRequstByID(CompanyCD, DocRequstID);

            //string Linker = "";//单个ID
            string MainIds       = ""; //每条记录多个ID
            string EmployeeNames = ""; //多个员工姓名

            DataTable dt = DocRequstDBHelper.GetDocRequstByID(CompanyCD, DocRequstID);

            DataColumn MainName = new DataColumn();

            dt.Columns.Add("MainName");

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                MainIds = dt.Rows[i]["Main"].ToString();

                string[] MainList = MainIds.Split(',');

                for (int j = 0; j < MainList.Length; j++)
                {
                    //获取参与人ID
                    int inputID = Convert.ToInt32(MainList[j]);
                    //调用方法取name
                    EmployeeNames = EmployeeNames + "," + EmployeeDBHelper.GetEmployeeNameByID(inputID, CompanyCD);
                }

                //插入EmployeeNames到一条记录
                dt.Rows[i]["MainName"] = EmployeeNames.Substring(1);
                EmployeeNames          = "";
            }

            return(dt);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 根据ID获得会议详细信息
        /// </summary>
        /// <param name="CompanyCD">公司代码</param>
        /// <param name="MeetingInfoID">会议ID</param>
        /// <returns>会议信息</returns>
        public static DataTable GetMeetingInfoByID(string CompanyCD, int MeetingInfoID)
        {
            //return MeetingInfoDBHelper.GetMeetingInfoByID(CompanyCD, MeetingInfoID);

            string MainIds       = ""; //每条记录多个ID
            string EmployeeNames = ""; //多个员工姓名

            DataTable dt = MeetingInfoDBHelper.GetMeetingInfoByID(CompanyCD, MeetingInfoID);

            DataColumn JoinName = new DataColumn();

            dt.Columns.Add("JoinName");

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                MainIds = dt.Rows[i]["JoinUser"].ToString();
                if (MainIds.StartsWith(","))
                {
                    MainIds = MainIds.Remove(0, 1);
                }
                if (MainIds.EndsWith(","))
                {
                    MainIds = MainIds.Remove(MainIds.Length - 1, 1);
                }

                string[] MainList = MainIds.Split(',');

                for (int j = 0; j < MainList.Length; j++)
                {
                    //获取参与人ID
                    int inputID = Convert.ToInt32(MainList[j]);
                    //调用方法取name
                    EmployeeNames = EmployeeNames + "," + EmployeeDBHelper.GetEmployeeNameByID(inputID, CompanyCD);
                }

                //插入EmployeeNames到一条记录
                dt.Rows[i]["JoinName"] = EmployeeNames.Substring(1);
                EmployeeNames          = "";
            }

            return(dt);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 根据洽谈ID获取洽谈信息的方法
        /// </summary>
        /// <param name="CompanyCD">公司代码</param>
        /// <param name="TalkID">洽谈ID</param>
        /// <returns>返回洽谈信息</returns>
        public static DataTable GetTalkInfoByID(string CompanyCD, int TalkID)
        {
            //return TalkDBHelper.GetTalkInfoByID(CompanyCD, TalkID);

            string Linker        = ""; //单个ID
            string LinkerIds     = ""; //每条记录多个ID
            string EmployeeNames = ""; //多个员工姓名

            DataTable dt = TalkDBHelper.GetTalkInfoByID(CompanyCD, TalkID);

            DataColumn LinkerName = new DataColumn();

            dt.Columns.Add("LinkerName");
            dt.Columns.Add("LinkerID");

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                LinkerIds = dt.Rows[i]["Linker"].ToString();

                string[] LinkerList = LinkerIds.Split(',');

                for (int j = 0; j < LinkerList.Length; j++)
                {
                    //获取参与人ID
                    int inputID = Convert.ToInt32(LinkerList[j]);
                    //调用方法取name
                    EmployeeNames = EmployeeNames + "," + EmployeeDBHelper.GetEmployeeNameByID(inputID, CompanyCD);
                    Linker        = Linker + "," + inputID;
                }

                //插入EmployeeNames到一条记录
                dt.Rows[i]["LinkerName"] = EmployeeNames.Substring(1);
                dt.Rows[i]["LinkerID"]   = Linker.Substring(1);
                //EmployeeNames = "";
            }

            return(dt);
        }