示例#1
0
        private static ExportBill ConvertExportBill(ServiceExportBill.export_bill item)
        {
            ExportBill ex = new ExportBill();

            ex.id          = item.id;
            ex.date        = item.date;
            ex.id_user     = item.id_user;
            ex.total_price = item.total_price;
            ex.status      = item.status;
            var u = sUser.GetUserById(item.id_user);

            ex.name_user    = u.name;
            ex.email_user   = u.email;
            ex.phone_number = u.phone_number;
            return(ex);
        }
示例#2
0
        private static List <ExportBill> ConvertListExportBill(List <ServiceExportBill.export_bill> myListExport)
        {
            List <ExportBill> listExport = new List <ExportBill>();

            foreach (var item in myListExport)
            {
                ExportBill ex = new ExportBill();
                ex.id          = item.id;
                ex.date        = item.date;
                ex.id_user     = item.id_user;
                ex.total_price = item.total_price;
                ex.status      = item.status;
                var u = sUser.GetUserById(item.id_user);
                ex.name_user    = u.name;
                ex.email_user   = u.email;
                ex.phone_number = u.phone_number;
                listExport.Add(ex);
            }
            return(listExport);
        }
 private static ExportBill ConvertExportBill(ServiceExportBill.export_bill item)
 {
     ExportBill ex = new ExportBill();
     ex.id = item.id;
     ex.date = item.date;
     ex.id_user = item.id_user;
     ex.total_price = item.total_price;
     ex.status = item.status;
     var u = sUser.GetUserById(item.id_user);
     ex.name_user = u.name;
     ex.email_user = u.email;
     ex.phone_number = u.phone_number;
     return ex;
 }
 private static List<ExportBill> ConvertListExportBill(List<ServiceExportBill.export_bill> myListExport)
 {
     List<ExportBill> listExport = new List<ExportBill>();
     foreach (var item in myListExport)
     {
         ExportBill ex = new ExportBill();
         ex.id = item.id;
         ex.date = item.date;
         ex.id_user = item.id_user;
         ex.total_price = item.total_price;
         ex.status = item.status;
         var u = sUser.GetUserById(item.id_user);
         ex.name_user = u.name;
         ex.email_user = u.email;
         ex.phone_number = u.phone_number;
         listExport.Add(ex);
     }
     return listExport;
 }