Esempio n. 1
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);
        }
Esempio n. 2
0
 public static User GetKhachHangById(int id)
 {
     ServiceUser.user u = sUser.GetUserById(id);
     return(ConvertUser(u));
 }