Example #1
0
        /// <summary>
        /// 获取订单基本信息
        /// </summary>
        public static ClientOrder GetClientOrderInfo(string orderID)
        {
            DataTable   dt    = ClientOrderDAL.BaseProvider.GetClientOrderInfo(orderID);
            ClientOrder model = new ClientOrder();

            if (dt.Rows.Count == 1)
            {
                DataRow row = dt.Rows[0];
                model.FillData(row);
                model.CreateUser = OrganizationBusiness.GetUserByUserID(model.CreateUserID, model.ClientID);
                if (string.IsNullOrEmpty(model.CreateUser.Name))
                {
                    M_Users mUser = M_UsersBusiness.GetUserDetail(model.CreateUserID);
                    if (mUser != null && !string.IsNullOrEmpty(mUser.Name))
                    {
                        model.CreateUser.Name = mUser.Name;
                    }
                }
                if (!string.IsNullOrEmpty(model.CheckUserID))
                {
                    model.CheckUser = OrganizationBusiness.GetUserByUserID(model.CheckUserID, model.ClientID);
                    if (string.IsNullOrEmpty(model.CheckUser.Name))
                    {
                        M_Users mUser = M_UsersBusiness.GetUserDetail(model.CheckUserID);
                        if (mUser != null && !string.IsNullOrEmpty(mUser.Name))
                        {
                            model.CheckUser.Name = mUser.Name;
                        }
                    }
                }
            }

            return(model);
        }
Example #2
0
        /// <summary>
        /// 获取订单基本信息
        /// </summary>
        public static ClientOrder GetClientOrderInfo(string orderID)
        {
            DataTable   dt    = ClientOrderDAL.BaseProvider.GetClientOrderInfo(orderID);
            ClientOrder model = new ClientOrder();

            if (dt.Rows.Count == 1)
            {
                DataRow row = dt.Rows[0];
                model.FillData(row);
            }

            return(model);
        }
Example #3
0
        public static List <ClientOrder> GetClientOrders(int status, int type, string beginDate, string endDate, string agentID, string clientID, int pageSize, int pageIndex, ref int totalCount, ref int pageCount)
        {
            DataTable dt = ClientOrderDAL.BaseProvider.GetClientOrders(status, type, beginDate, endDate, agentID, clientID, pageSize, pageIndex, ref totalCount, ref pageCount);

            List <ClientOrder> list = new List <ClientOrder>();

            if (dt.Rows.Count > 0)
            {
                foreach (DataRow row in dt.Rows)
                {
                    ClientOrder model = new ClientOrder();

                    model.FillData(row);
                    model.CreateUser = OrganizationBusiness.GetUserByUserID(model.CreateUserID, model.AgentID);
                    list.Add(model);
                }
            }

            return(list);
        }
Example #4
0
        public static List <ClientOrder> GetBase(string keyWords, int status, int type, string beginDate, string endDate, string clientID, int userType, int pageSize, int pageIndex, ref int totalCount, ref int pageCount)
        {
            DataTable          dt   = ClientOrderDAL.BaseProvider.GetClientOrders(keyWords, status, type, beginDate, endDate, clientID, pageSize, pageIndex, ref totalCount, ref pageCount);
            List <ClientOrder> list = new List <ClientOrder>();

            if (dt.Rows.Count > 0)
            {
                foreach (DataRow row in dt.Rows)
                {
                    ClientOrder model = new ClientOrder();
                    model.FillData(row);
                    if (!string.IsNullOrEmpty(model.CheckUserID))
                    {
                        model.CheckUser = OrganizationBusiness.GetUserByUserID(model.CheckUserID, model.ClientID);
                        if (string.IsNullOrEmpty(model.CheckUser.Name))
                        {
                            M_Users mUser = M_UsersBusiness.GetUserDetail(model.CheckUserID);
                            if (mUser != null && !string.IsNullOrEmpty(mUser.Name))
                            {
                                model.CheckUser.Name = mUser.Name;
                            }
                        }
                    }
                    model.CreateUser = OrganizationBusiness.GetUserByUserID(model.CreateUserID, model.ClientID);
                    if (string.IsNullOrEmpty(model.CreateUser.Name))
                    {
                        M_Users mUser = M_UsersBusiness.GetUserDetail(model.CreateUserID);
                        if (mUser != null && !string.IsNullOrEmpty(mUser.Name))
                        {
                            model.CreateUser.Name = mUser.Name;
                        }
                    }
                    list.Add(model);
                }
            }
            return(list);
        }