public override double BuildOrderAmount() { try { double OrderAmount = 0; OrderDetailsDataLayer OrderDetailsDataLayerObj = new OrderDetailsDataLayer(UserProfileObj, OrderObj); DataSet Output = OrderDetailsDataLayerObj.FetchOrderDetailsByType(); foreach (DataRow dr in Output.Tables[0].Rows) { if (int.Parse(dr["oId"].ToString()) == OrderObj.GetOrderID()) { OrderAmount = double.Parse(dr["Amount"].ToString()); } } return(OrderAmount); } catch (Exception ex) { Logger.Instance().Log(Fatal.Instance(), ex); throw ex; } }
public override DateTime BuildOrderDate() { try { string OrderDateTimeStr = null; OrderDetailsDataLayer OrderDetailsDataLayerObj = new OrderDetailsDataLayer(UserProfileObj, OrderObj); DataSet Output = OrderDetailsDataLayerObj.FetchOrderDetailsByType(); foreach (DataRow dr in Output.Tables[0].Rows) { if (int.Parse(dr["oId"].ToString()) == OrderObj.GetOrderID()) { OrderDateTimeStr = DateTime.Parse(dr["date"].ToString()).ToString(); } } return(DateTime.Parse(OrderDateTimeStr)); } catch (Exception ex) { Logger.Instance().Log(Fatal.Instance(), ex); throw ex; } }
public override string BuildOrderStatus() { try { string Status = null; OrderDetailsDataLayer OrderDetailsDataLayerObj = new OrderDetailsDataLayer(UserProfileObj, OrderObj); DataSet Output = OrderDetailsDataLayerObj.FetchOrderDetailsByType(); foreach (DataRow dr in Output.Tables[0].Rows) { if (int.Parse(dr["oId"].ToString()) == OrderObj.GetOrderID()) { Status = dr["statusName"].ToString(); } } return(Status); } catch (Exception ex) { Logger.Instance().Log(Fatal.Instance(), ex); throw ex; } }
public override List <String> BuildOrderStores() { try { List <string> StoreLogoList = new List <string>(); IOrderDetailsDataLayer OrderDetailsDataLayerObj = new OrderDetailsDataLayer(UserProfileObj, OrderObj); DataSet Output = OrderDetailsDataLayerObj.FetchOrderDetailsByType(); foreach (DataRow dr in Output.Tables[1].Rows) { if (int.Parse(dr["oId"].ToString()) == OrderObj.GetOrderID()) { IStores StoreImageObj = new Stores(); StoreImageObj.SetStoreLogo(dr["storeLogo"].ToString()); StoreLogoList.Add(StoreImageObj.GetStoreLogo()); } } return(StoreLogoList); } catch (Exception ex) { Logger.Instance().Log(Fatal.Instance(), ex); throw ex; } }