public BaseResponse <DeliveryDetail> ListAll(string userName) { var list = new DeliveryDAO().ListAll(userName); BaseResponse <DeliveryDetail> response = new BaseResponse <DeliveryDetail>(StatusResponse.Success, "", list); return(response); }
public BaseResponse <Bill> ListAll() { var list = new BillDAO().GetAllBill(); foreach (var item in list) { var deliverydetail = new DeliveryDAO().Get(item.DeliveryDetailID); item.Name = deliverydetail.Name; item.Phone = deliverydetail.PhoneNumber; item.Adress = deliverydetail.Adress; double value = 0; decimal price = new BillDetailDAO().TotalPrice(item.ID); if (!string.IsNullOrEmpty(item.DiscountCode)) { price = price - price * (decimal)(new DiscountDAO().Get(item.DiscountCode).Value); value = (new DiscountDAO().Get(item.DiscountCode).Value) * 100; } item.DiscountValue = value; item.TotalPrice = price; } StatusResponse status = list != null ? StatusResponse.Success : StatusResponse.Fail; BaseResponse <Bill> response = new BaseResponse <Bill>(status, "", list); return(response); }
static void Main(string[] args) { DeliveryDAO da = new DeliveryDAO(); delivery del = new delivery(); // ConnectionFactory.setConnection("mysql", "127.0.0.1", "vbadb", "root", "root"); del.iddeliveryId = 32; delivery x = da.getDlivery(del); ICollection <deliverypart> b = x.deliveryparts; int a = 2; // var a = new DeliveryDAO(); // a.add(); /** deliverypart delpart = new deliverypart(); * delpart.id = 10; * delpart.deliverypartName ="fdfdf"; * * deliverypart delpart2 = new deliverypart(); * delpart2.id = 10; * delpart2.deliverypartName = "fdfdf"; * delivery xi = new delivery(); * object obj = new[] { delpart2, delpart };**/ /** var strings = ((IEnumerable)obj).Cast<object>() * .Select(x => x == null ? x : x.ToString()) * .ToArray(); * string[] mm=strings.Select(x2 => x2.ToString()).ToArray();**/ // string kk = strings.ToList<string>(); //double []m=x.LoadComObjectIntoDoubleArray(obj); // deliverypart[] strings = ((IEnumerable)obj).Cast<object>() // .Select(x => (deliverypart)x) // .ToArray(); }
public BaseResponse <DeliveryDetail> Update(DeliveryDetail obj) { bool result = new DeliveryDAO().Update(obj); var status = result ? StatusResponse.Success : StatusResponse.Fail; BaseResponse <DeliveryDetail> response = new BaseResponse <DeliveryDetail>(status, "", null); return(response); }
public BaseResponse <DeliveryDetail> Delete(string userName, int id) { var result = new DeliveryDAO().Delete(userName, id); var status = result ? StatusResponse.Success : StatusResponse.Fail; BaseResponse <DeliveryDetail> response = new BaseResponse <DeliveryDetail>(status, "", null); return(response); }
public BaseResponse <DeliveryDetail> Create(DeliveryDetail obj) { var result = new DeliveryDAO().Create(obj); var list = new List <DeliveryDetail>(); if (result != null) { list.Add(result); } var status = result != null ? StatusResponse.Success : StatusResponse.Fail; BaseResponse <DeliveryDetail> response = new BaseResponse <DeliveryDetail>(status, "", list); return(response); }
/// <summary> /// 构造函数 /// </summary> public DeliveryBLL(LoggingSessionInfo pUserInfo) { this.CurrentUserInfo = pUserInfo; this._currentDAO = new DeliveryDAO(pUserInfo); }
public int UpdateReceiveHeader(Database db, InventoryTransactionDTO data) { DeliveryDAO dao = new DeliveryDAO(Common.CurrentDatabase); return(dao.UpdateReceiveHeader(db, data)); }
public List <ActualOnhandViewDTO> Load_LotMaintenance(NZString SlipNo, NZString LocCd, NZString ItemCd, bool IncludeOldData) { DeliveryDAO dao = new DeliveryDAO(Common.CurrentDatabase); return(dao.Load_LotMaintenance(SlipNo, LocCd, ItemCd, IncludeOldData)); }
public DataTable Load_Invoice(NZString SlipNo, bool OldData) { DeliveryDAO dao = new DeliveryDAO(Common.CurrentDatabase); return(dao.Load_Invoice(SlipNo, OldData)); }
public DataTable Load_DeliveryOrderListForReturn(NZDateTime DateBegin, NZDateTime DateEnd, NZString ItemCd, NZString ShortName, NZString CustomerCd, NZString Return_Slip_No, bool OldData) { DeliveryDAO dao = new DeliveryDAO(Common.CurrentDatabase); return(dao.Load_DeliveryOrderListForReturn(DateBegin, DateEnd, ItemCd, ShortName, CustomerCd, Return_Slip_No, OldData)); }
public DataTable Load_DeliveryList(NZDateTime DateBegin, NZDateTime DateEnd, bool OldData) { DeliveryDAO dao = new DeliveryDAO(Common.CurrentDatabase); return(dao.Load_DeliveryList(DateBegin, DateEnd, OldData)); }
public List <DeliveryViewDTO> Load_OrderMaintenance(NZDateTime DateBegin, NZDateTime DateEnd, NZString CustomerCd, NZString Currency, NZString SlipNo, bool IncludeOldData) { DeliveryDAO dao = new DeliveryDAO(Common.CurrentDatabase); return(dao.Load_OrderMaintenance(DateBegin, DateEnd, CustomerCd, Currency, SlipNo, IncludeOldData)); }