Ejemplo n.º 1
0
        public static string ChannelFPageList(string comid, int pageindex, int pagesize, string key, int channelcomid)
        {
            var totalcount = 0;

            if (channelcomid == 0)
            {
                return(JsonConvert.SerializeObject(new { type = 1, msg = "传递参数错误" }));
            }

            try
            {
                var financedata = new B2bFinanceData();
                var orderdata   = new B2bOrderData();
                var channeldata = new MemberChannelcompanyData();


                var         list   = financedata.FinancePageList(comid, pageindex, pagesize, key, out totalcount, channelcomid);
                IEnumerable result = "";
                if (list != null)
                {
                    result = from finance in list
                             select new
                    {
                        Id                = finance.Id,
                        Com_id            = finance.Com_id,
                        ComName           = B2bCompanyData.GetCompany(finance.Com_id).Com_name,
                        Agent_id          = finance.Agent_id,
                        Eid               = finance.Eid,
                        Order_id          = finance.Order_id,
                        Servicesname      = finance.Servicesname,
                        ShortServicesname = finance.Servicesname.Length > 15 ? finance.Servicesname.Substring(0, 15) + "." : finance.Servicesname,
                        SerialNumber      = finance.SerialNumber,
                        Money             = finance.Money,
                        Money_come        = finance.Money_come,
                        Over_money        = finance.Over_money,
                        Payment           = finance.Payment,
                        Payment_type      = finance.Payment_type,
                        Subdate           = finance.Subdate,
                        Con_state         = finance.Con_state,
                        Remarks           = finance.Remarks,
                        PrintscreenUrl    = new FileUploadData().GetFileById(finance.Printscreen.ToString().ConvertTo <int>(0)) == null ? "" : new FileUploadData().GetFileById(finance.Printscreen.ToString().ConvertTo <int>(0)).Relativepath,
                        Pno               = orderdata.GetPnoByOrderId(finance.Order_id),
                        Channelid         = finance.Channelid,
                        ChannelName       = channeldata.GetChannelCompanyNameById(finance.Channelid),
                        Paychannelstate   = finance.Paychannelstate
                    }
                }
                ;

                return(JsonConvert.SerializeObject(new { type = 100, totalCount = totalcount, msg = result }));
            }
            catch (Exception ex)
            {
                return(JsonConvert.SerializeObject(new { type = 1, msg = ex.Message }));

                throw;
            }
        }
Ejemplo n.º 2
0
        public static string ComFinancePageList(string comid, int pageindex, int pagesize, string key, int oid = 0, string payment_type = "", string money_come = "", string starttime = "", string endtime = "")
        {
            var totalcount = 0;

            try
            {
                var financedata = new B2bFinanceData();
                var orderdata   = new B2bOrderData();
                var channeldata = new MemberChannelcompanyData();

                B2bPayData  datapay = new B2bPayData();
                var         list    = financedata.FinancePageList(comid, pageindex, pagesize, key, out totalcount, 0, oid, payment_type, money_come, starttime, endtime);
                IEnumerable result  = "";
                if (list != null)
                {
                    result = from finance in list
                             select new
                    {
                        Id                = finance.Id,
                        Com_id            = finance.Com_id,
                        ComName           = B2bCompanyData.GetCompany(finance.Com_id).Com_name,
                        Agent_id          = finance.Agent_id,
                        Eid               = finance.Eid,
                        Order_id          = finance.Order_id,
                        Servicesname      = finance.Servicesname,
                        ShortServicesname = finance.Servicesname.Length > 15 ? finance.Servicesname.Substring(0, 15) + "." : finance.Servicesname,
                        SerialNumber      = finance.SerialNumber,
                        Money             = finance.Money,
                        Money_come        = finance.Money_come,
                        Over_money        = finance.Over_money,
                        Payment           = finance.Payment,
                        Payment_type      = finance.Payment_type,
                        Subdate           = finance.Subdate,
                        Con_state         = finance.Con_state,
                        Remarks           = finance.Remarks,
                        Pno               = orderdata.GetPnoByOrderId(finance.Order_id),
                        Channelid         = finance.Channelid,
                        ChannelName       = channeldata.GetChannelCompanyNameById(finance.Channelid),
                        Paychannelstate   = finance.Paychannelstate,
                        Agentname         = financedata.GetAgentNamebyorderid(finance.Order_id),
                        Payinfo           = datapay.GetPayByoId(finance.Order_id)
                    }
                }
                ;

                return(JsonConvert.SerializeObject(new { type = 100, totalCount = totalcount, msg = result }));
            }
            catch (Exception ex)
            {
                return(JsonConvert.SerializeObject(new { type = 1, msg = ex.Message }));

                throw;
            }
        }