public Products Select(IProductByStore ProductObj) { try { if (new MaintenanceMode().IsMaintenanceModeEnabled() == APIResponse.OK) { return(null); } int PBSId = ProductObj.GetProductByStoreID(); DataRow DrPBSData = new ProductTemplate().FetchAllProductByStoreID(PBSId); Products ProductReponseObj = new Products(); if (DrPBSData != null) { ProductReponseObj.ProductName = DrPBSData["productName"].ToString(); ProductReponseObj.Quantity = int.Parse(DrPBSData["Quantity"].ToString()); ProductReponseObj.StoreLogo = DrPBSData["storeLogo"].ToString(); ProductReponseObj.ProductImage = DrPBSData["productImage"].ToString(); ProductReponseObj.Price = double.Parse(DrPBSData["price"].ToString()); ProductReponseObj.pbsID = PBSId; } return(ProductReponseObj); } catch (Exception ex) { Logger.Instance().Log(Fatal.Instance(), ex); throw ex; } }
public int ExecuteNonQuery(string commandText, Object commandType, Object[] commandParameters) { using (var connection = new MySqlConnection(GrockartCredentails.fetchCredentails)) { using (var command = new MySqlCommand(commandText, connection)) { try { connection.Open(); int affectedRows = 0; command.CommandType = (CommandType)commandType; if (commandParameters != null) { command.Parameters.AddRange(commandParameters); } affectedRows = command.ExecuteNonQuery(); return(affectedRows); } catch (Exception ex) { Logger.Instance().Log(Fatal.Instance(), ex); throw ex; } finally { connection.Close(); command.Dispose(); } } } }
public IUserProfile FetchParticularProfile(IUserProfile UserProfileObj) { try { string Token = UserProfileObj.GetToken(); DATALAYER.UserTemplate <IUserProfile> UserDataLayerTemplate = new DATALAYER.NormalUserTemplate(UserProfileObj); DataSet output = UserDataLayerTemplate.FetchProfile(UserProfileObj); if (output.Tables[0].Rows.Count > 0) { UserProfile profile = new UserProfile(); profile.SetFirstName(output.Tables[0].Rows[0]["firstname"].ToString()); profile.SetLastName(output.Tables[0].Rows[0]["lastname"].ToString()); profile.SetEmail(output.Tables[0].Rows[0]["email"].ToString()); profile.SetIsAdmin(output.Tables[0].Rows[0]["roleName"].ToString() == "ADMIN" ? true : false); profile.SetAmountOwe(0); profile.SetAmountPaid(0); profile.SetToken(Token); return(profile); } else { return(null); } } catch (Exception ex) { // log the exception Logger.Instance().Log(Fatal.Instance(), ex); throw ex; } }
public override APIResponse Update(ICategory CategoryObj) { try { bool Response = new Security(UserProfileObj).AuthenticateAdmin(); if (Response == true) { if (0 == CategoryTemplateObj.Update(CategoryObj)) { return(APIResponse.NOT_OK); } else { return(APIResponse.OK); } } else { return(APIResponse.NOT_AUTHENTICATED); } } catch (Exception ex) { Logger.Instance().Log(Fatal.Instance(), ex); throw ex; } }
public override APIResponse Insert(ICategory CategoryObj) { try { bool Response = new Security(UserProfileObj).AuthenticateAdmin(); if (Response == true) { if (0 == CategoryTemplateObj.Insert(CategoryObj)) { return(APIResponse.NOT_OK); } else { return(APIResponse.OK); } } else { return(APIResponse.NOT_AUTHENTICATED); } } catch (NullReferenceException nex) { Logger.Instance().Log(Warn.Instance(), new LogInfo("Received null reference while adding category (Routine : AuthenticateAdmin), might be token manipulation. Check token : " + UserProfileObj.GetToken())); throw nex; } catch (Exception ex) { Logger.Instance().Log(Fatal.Instance(), ex); throw ex; } }
public override List <IOrder> Select() { Source = "sp_FetchOrder"; string Token = UserProfileObj.GetToken(); try { Object[] param = { new MySqlParameter("@paramToken", Token) }; DataSet Output = Commands.ExecuteQuery(Source, CommandType.StoredProcedure, param); List <IOrder> OrderDetailsList = new List <IOrder>(); foreach (DataRow dr in Output.Tables[0].Rows) { IOrder Order = new Order(); Order.SetStatusID(Int32.Parse(dr["sID"].ToString())); Order.SetOrderID(Int32.Parse(dr["oID"].ToString())); Order.SetOrderDate(DateTime.Parse(dr["date"].ToString())); Order.SetStatusName(dr["statusName"].ToString()); Order.SetOrderType(dr["oTypeName"].ToString()); OrderDetailsList.Add(Order); } return(OrderDetailsList); } catch (Exception ex) { Logger.Instance().Log(Fatal.Instance(), ex); throw ex; } }
public APIResponse RecoverPassword(string FPToken, string Email) { Source = "sp_addFPToken"; try { if (null == FPToken || null == Email) { throw new ArgumentException("Parameter : Null, Function : ForgotPassword"); } object[] param = { new MySqlParameter("@paramFPToken", FPToken), new MySqlParameter("@paramEmail", Email), new MySqlParameter("@paramTimeStamp", DateTime.Now) }; Commands.ExecuteQuery(Source, CommandType.StoredProcedure, param); return(APIResponse.OK); } catch (MySqlException mse) { Logger.Instance().Log(Fatal.Instance(), mse); throw mse; } catch (Exception ex) { Logger.Instance().Log(Fatal.Instance(), ex); throw ex; } }
public DataSet FetchOrderDetailsByID() { Source = "sp_GetOrderDetails"; string Token = UserProfileObj.GetToken(); int OrderID = OrderObj.GetOrderID(); try { Object[] param = { new MySqlParameter("@paramOID", OrderID), new MySqlParameter("@paramToken", Token) }; return(Commands.ExecuteQuery(Source, CommandType.StoredProcedure, param)); } catch (MySqlException mse) { Logger.Instance().Log(Fatal.Instance(), mse); throw mse; } catch (Exception ex) { Logger.Instance().Log(Fatal.Instance(), ex); throw ex; } }
protected void Page_Load(object sender, EventArgs e) { List <IUserProfile> FetchAdminList = null; try { UserProfile UserProfileObj = new UserProfile(); UserProfileObj.SetToken(CookieProxy.Instance().GetValue("t").ToString()); UserTemplate <IUserProfile> Profile = new AdminUserTemplate(UserProfileObj); FetchAdminList = Profile.FetchList(); if (FetchAdminList == null) { CookieProxy.Instance().SetValue("LoginMessage", "Unable to authenticate the token, please relogin or check logs", DateTime.Now.AddDays(2)); } Logger.Instance().Log(Info.Instance(), new LogInfo(new AdminUserTemplate().FetchParticularProfile(UserProfileObj).GetEmail() + " fetched admin list ")); } catch (Exception ex) { Logger.Instance().Log(Fatal.Instance(), ex); } finally { Response.Write(new JavaScriptSerializer().Serialize(FetchAdminList)); } }
public override List <IProductByStore> Select() { Source = "sp_FetchProductByStore"; // Product fetching stored procedure try { Object[] param = null; DataSet Output = Commands.ExecuteQuery(Source, CommandType.StoredProcedure, param); List <IProductByStore> ProductList = new List <IProductByStore>(); foreach (DataRow dr in Output.Tables[0].Rows) { IProductByStore Product = new ProductByStore(); Product.SetProductByStoreID(Int32.Parse(dr["pbsID"].ToString())); Product.SetStoreID(Int32.Parse(dr["sID"].ToString())); Product.SetCategoryID(Int32.Parse(dr["cID"].ToString())); Product.SetProductID(Int32.Parse(dr["pID"].ToString())); Product.SetStoreName(dr["storeName"].ToString()); Product.SetCategoryName(dr["categoryName"].ToString()); Product.SetProductName(dr["productName"].ToString()); Product.SetPrice((double)dr["price"]); Product.SetQuantity(Int32.Parse(dr["Quantity"].ToString())); Product.SetQuantityPerUnit(dr["QuantityPerUnit"].ToString()); ProductList.Add(Product); } return(ProductList); } catch (Exception ex) { Logger.Instance().Log(Fatal.Instance(), ex); throw ex; } }
public override int Insert(IProductByStore ProductByStoreObj) { Source = "sp_AddProduct"; int StoreID = ProductByStoreObj.GetStoreID(); int CategoryID = ProductByStoreObj.GetCategoryID(); int ProductID = ProductByStoreObj.GetProductID(); double Price = ProductByStoreObj.GetPrice(); string QuantityPerUnit = ProductByStoreObj.GetQuantityPerUnit(); int Quantity = ProductByStoreObj.GetQuantity(); try { Object[] param = { new MySqlParameter("@paramSID", StoreID), new MySqlParameter("@paramCID", CategoryID), new MySqlParameter("@paramPID", ProductID), new MySqlParameter("@paramPrice", Price), new MySqlParameter("@paramQuantityPerUnit", QuantityPerUnit), new MySqlParameter("@paramQuantity", Quantity) }; return(Commands.ExecuteNonQuery(Source, System.Data.CommandType.StoredProcedure, param)); } catch (Exception ex) { Logger.Instance().Log(Fatal.Instance(), ex); throw ex; } }
public override List <IProduct> Select() { Source = "sp_FetchProductOnly"; // Product fetching stored procedure try { Object[] param = null; DataSet Output = Commands.ExecuteQuery(Source, CommandType.StoredProcedure, param); List <IProduct> ProductList = new List <IProduct>(); foreach (DataRow dr in Output.Tables[0].Rows) { IProduct Product = new ProductsOnly(); Product.SetProductId(Int32.Parse(dr["pID"].ToString())); Product.SetProductName(dr["productName"].ToString()); Product.SetProductImage(dr["productImage"].ToString()); ProductList.Add(Product); } return(ProductList); } catch (Exception ex) { Logger.Instance().Log(Fatal.Instance(), ex); throw ex; } }
public bool AuthenticateUser() { try { if (new MaintenanceMode().IsMaintenanceModeEnabled() == APIResponse.OK) { // maintenance mode : ALL AUTH DISABLED return(false); } DataSet Response = SecurityObjDataLayer.GetUserToken(); if (Response == null || Response.Tables[0].Rows.Count == 0 || int.Parse(Response.Tables[0].Rows[0][0].ToString()) == 0) { return(false); } else { return(true); } } catch (Exception ex) { Logger.Instance().Log(Fatal.Instance(), ex); throw ex; } }
public bool AuthenticateAdmin() { try { if (UserProfileObj.GetIsAdmin() == false) { Logger.Instance().Log(Warn.Instance(), new LogInfo(UserProfileObj.GetEmail().ToString() + " tried to access the admin panel but failed. ")); } return(UserProfileObj.GetIsAdmin()); } catch (ArgumentException AEX) { Logger.Instance().Log(Warn.Instance(), new WarnDebug("Anonymous user tried to access the Admin panel, but failed")); throw AEX; } catch (NullReferenceException nex) { Logger.Instance().Log(Fatal.Instance(), new LogInfo("Unable to authenticate Admin, got exception : " + nex.Message.ToString())); throw nex; } catch (Exception ex) { Logger.Instance().Log(Fatal.Instance(), ex); throw ex; } }
public APIResponse Cancel(IOrder StatusObj) { try { bool Response = new Security(UserProfileObj).AuthenticateUser(); if (Response == true) { if (0 == new OrderDataLayer(UserProfileObj).Cancel(StatusObj)) { return(APIResponse.NOT_OK); } else { return(APIResponse.OK); } } else { return(APIResponse.NOT_AUTHENTICATED); } } catch (Exception ex) { Logger.Instance().Log(Fatal.Instance(), ex); throw ex; } }
public override List <ICardDetails> Select() { Source = "sp_FetchCardDetails "; try { Object[] param = { new MySqlParameter("@paramToken", UserProfileObj.GetToken()) }; DataSet Output = Commands.ExecuteQuery(Source, CommandType.StoredProcedure, param); List <ICardDetails> CardDetail = new List <ICardDetails>(); foreach (DataRow dr in Output.Tables[0].Rows) { ICardDetails CardObj = new CardDetails(); CardObj.SetCardID(Int32.Parse(dr["caID"].ToString())); CardObj.SetName(dr["CardNameEncrypt"].ToString()); CardObj.SetCardNumber(dr["CardNumberEncrypt"].ToString()); CardObj.SetExpiryMonth(dr["ExpiryMonthEncrypt"].ToString()); CardObj.SetExpiryYear((dr["ExpiryYearEncrypt"].ToString())); CardObj.SetCvv((dr["CvvEncrypt"].ToString())); CardObj.SetIV(dr["Salt"].ToString()); CardObj.SetDecryptionKey(dr["DecryptionKey"].ToString()); CardDetail.Add(CardObj); } return(CardDetail); } catch (Exception ex) { Logger.Instance().Log(Fatal.Instance(), ex); throw ex; } }
public override int Update(IOrder OrderObj) { Source = "sp_ModifyOrder"; int OrderID = OrderObj.GetStatusID(); string StatusName = OrderObj.GetStatusName(); string Token = UserProfileObj.GetToken(); string OrderType = OrderObj.GetOrderType(); DateTime OrderDate = OrderObj.GetOrderDate(); try { Object[] param = { new MySqlParameter("@paramOrderID", OrderID), new MySqlParameter("@paramToken", Token), new MySqlParameter("@paramStatusName", StatusName), new MySqlParameter("@paramOrderType", OrderType), new MySqlParameter("@paramOrderDate", OrderDate) }; return(Commands.ExecuteNonQuery(Source, CommandType.StoredProcedure, param)); } catch (Exception ex) { Logger.Instance().Log(Fatal.Instance(), ex); throw ex; } }
public override int Insert(ICardDetails CardDetailsObj) { Source = "sp_AddCard"; string Token = UserProfileObj.GetToken(); string IV = CardDetailsObj.GetIV(); string DecryptionKey = CardDetailsObj.GetDecryptionKey(); string CardName = CardDetailsObj.GetName(); string CardNum = CardDetailsObj.GetCardNumber(); string ExpiryMonth = CardDetailsObj.GetExpiryMonth(); string ExpiryYear = CardDetailsObj.GetExpiryYear(); string CvvNum = CardDetailsObj.GetCvv(); try { Object[] param = { new MySqlParameter("@paramToken", Token), new MySqlParameter("@paramIV", IV), new MySqlParameter("@paramDecryptionKey", DecryptionKey), new MySqlParameter("@paramCardName", CardName), new MySqlParameter("@paramCardNum", CardNum), new MySqlParameter("@paramExpiryMonth", ExpiryMonth), new MySqlParameter("@paramExpiryYear", ExpiryYear), new MySqlParameter("@paramCvvNum", CvvNum) }; return(Commands.ExecuteNonQuery(Source, System.Data.CommandType.StoredProcedure, param)); } catch (Exception ex) { Logger.Instance().Log(Fatal.Instance(), ex); throw ex; } }
public int Cancel(IOrder OrderObj) { Source = "sp_CancelOrder"; int OrderID = OrderObj.GetOrderID(); try { Object[] param = { new MySqlParameter("@paramOID", OrderID), new MySqlParameter("@paramToken", UserProfileObj.GetToken()), }; return(Commands.ExecuteNonQuery(Source, CommandType.StoredProcedure, param)); } catch (MySqlException mse) { Logger.Instance().Log(Fatal.Instance(), mse); throw mse; } catch (Exception ex) { Logger.Instance().Log(Fatal.Instance(), ex); throw ex; } }
public Dictionary <int, string> GetCityList(string ProvinceName) { try { Dictionary <int, string> OutputDictionary = new Dictionary <int, string>(); if (new Security(UserProfileObj).AuthenticateUser()) { DataSet OutputDataset = ProvinceDataLayer.GetDatasetOfProvinces(); DataView DVTable = OutputDataset.Tables[0].DefaultView; DVTable.Sort = "province asc"; DataTable dtSorted = DVTable.ToTable(); DataRow[] DrFiltered = dtSorted.Select("province = '" + ProvinceName + "'"); foreach (DataRow dr in DrFiltered) { OutputDictionary.Add(int.Parse(dr["cid"].ToString()), dr["city"].ToString()); } } return(OutputDictionary); } catch (Exception ex) { Logger.Instance().Log(Fatal.Instance(), ex); throw ex; } }
public override List <IUserProfile> FetchList() { Source = "sp_GetAdminList"; string Token = UserProfileObj.GetToken(); try { Object[] paramToken = { new MySqlParameter("@paramToken", Token.ToString()) }; // Connection : Get the current connection string // Commands : Get the current commands MySQL Connection can perform DataSet Output = Commands.ExecuteQuery(Source, CommandType.StoredProcedure, paramToken); List <IUserProfile> ProductList = new List <IUserProfile>(); foreach (DataRow dr in Output.Tables[0].Rows) { UserProfile Profile = new UserProfile ( FirstName: dr["firstName"].ToString(), LastName: dr["lastName"].ToString(), Email: dr["email"].ToString(), IsAdmin: true ); ProductList.Add(Profile); } return(ProductList); } catch (Exception ex) { Logger.Instance().Log(Fatal.Instance(), ex); throw ex; } }
public override int Update(IAddress AddressObj) { Source = "sp_ModifyAddress"; int AddressID = AddressObj.GetAddressID(); string Token = UserProfileObj.GetToken(); string CityName = AddressObj.GetCity(); string ProvinceName = AddressObj.GetProvince(); // int UserID = AddressObj.GetUserID(); string AptNum = AddressObj.GetAptNum(); string StreetName = AddressObj.GetStreetName(); string PostalCode = AddressObj.GetPostalCode(); string PhoneNum = AddressObj.GetPhoneNum(); try { Object[] param = { new MySqlParameter("@paramAID", AddressID), new MySqlParameter("@paramToken", Token), new MySqlParameter("@paramCity", CityName), new MySqlParameter("@paramProvince", ProvinceName), //new MySqlParameter("@paramUID", UserID), new MySqlParameter("@paramApt", AptNum), new MySqlParameter("@paramStreet", StreetName), new MySqlParameter("@paramPostal", PostalCode), new MySqlParameter("@paramPhone", PhoneNum) }; return(Commands.ExecuteNonQuery(Source, CommandType.StoredProcedure, param)); } catch (Exception ex) { Logger.Instance().Log(Fatal.Instance(), ex); throw ex; } }
public override List <ICategory> Select() { try { bool Response = new Security(UserProfileObj).AuthenticateAdmin(); if (Response == true) { return(CategoryTemplateObj.Select()); } else { return(null); } } catch (NullReferenceException nex) { Logger.Instance().Log(Warn.Instance(), new LogInfo("Received null reference while fetching category (Routine : AuthenticateAdmin), might be token manipulation. Check token : " + UserProfileObj.GetToken())); throw nex; } catch (Exception ex) { Logger.Instance().Log(Fatal.Instance(), ex); throw ex; } }
public override List <IAddress> Select() { Source = "sp_FetchAddress"; try { Object[] param = { new MySqlParameter("@paramToken", UserProfileObj.GetToken()) }; DataSet Output = Commands.ExecuteQuery(Source, CommandType.StoredProcedure, param); List <IAddress> AddressDetails = new List <IAddress>(); foreach (DataRow dr in Output.Tables[0].Rows) { IAddress AddressObject = new Address( AddressID: int.Parse(dr["aid"].ToString()), AddressName: dr["addressName"].ToString(), StreetName: dr["streetName"].ToString(), AptNum: dr["appt"].ToString(), PostalCode: dr["postalcode"].ToString(), PhoneNum: dr["phone"].ToString(), City: dr["city"].ToString(), Province: dr["province"].ToString(), CID: int.Parse(dr["cid"].ToString()) ); AddressDetails.Add(AddressObject); } return(AddressDetails); } catch (Exception ex) { Logger.Instance().Log(Fatal.Instance(), ex); throw ex; } }
// source : https://stackoverflow.com/a/1344255 public string GetUniqueKey(int maxSize) { try { char[] chars = new char[62]; chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890".ToCharArray(); byte[] data = new byte[1]; using (RNGCryptoServiceProvider crypto = new RNGCryptoServiceProvider()) { crypto.GetNonZeroBytes(data); data = new byte[maxSize]; crypto.GetNonZeroBytes(data); } StringBuilder result = new StringBuilder(maxSize); foreach (byte b in data) { result.Append(chars[b % (chars.Length)]); } return(result.ToString()); } catch (Exception ex) { Logger.Instance().Log(Fatal.Instance(), ex); return(null); } }
public override int Delete(IAddress AddressObj) { Source = "sp_RemoveAddress"; int AddressID = AddressObj.GetAddressID(); try { Object[] param = { new MySqlParameter("@paramAID", AddressID), new MySqlParameter("@paramToken", UserProfileObj.GetToken()) }; return(Commands.ExecuteNonQuery(Source, CommandType.StoredProcedure, param)); } catch (MySqlException mse) { Logger.Instance().Log(Fatal.Instance(), mse); throw mse; } catch (Exception ex) { Logger.Instance().Log(Fatal.Instance(), ex); throw ex; } }
public DataSet ExecuteQuery(string commandText, Object commandType, Object[] commandParameters) { using (var connection = new MySqlConnection(GrockartCredentails.fetchCredentails)) { using (var command = new MySqlCommand(commandText, connection)) { try { connection.Open(); DataSet ds = new DataSet(); command.CommandType = (CommandType)commandType; if (commandParameters != null) { command.Parameters.AddRange(commandParameters); } using (MySqlDataAdapter da = new MySqlDataAdapter(command)) { da.Fill(ds); } return(ds); } catch (Exception ex) { Logger.Instance().Log(Fatal.Instance(), ex); throw ex; } finally { connection.Close(); command.Dispose(); } } } }
public override int Insert(IAddress AddressObj) { Source = "sp_AddAddress"; string Token = UserProfileObj.GetToken(); int CID = AddressObj.GetCityID(); string AptNum = AddressObj.GetAptNum(); string StreetName = AddressObj.GetStreetName(); string PostalCode = AddressObj.GetPostalCode(); string PhoneNum = AddressObj.GetPhoneNum(); string AddressName = AddressObj.GetAddresstName(); try { Object[] param = { new MySqlParameter("@paramToken", Token), new MySqlParameter("@paramCID", CID), new MySqlParameter("@paramApt", AptNum), new MySqlParameter("@paramStreet", StreetName), new MySqlParameter("@paramPostal", PostalCode), new MySqlParameter("@paramPhone", PhoneNum), new MySqlParameter("@paramAddressName", AddressName) }; return(Commands.ExecuteNonQuery(Source, System.Data.CommandType.StoredProcedure, param)); } catch (Exception ex) { Logger.Instance().Log(Fatal.Instance(), ex); throw ex; } }
public override APIResponse Update(ICardDetails CardDetailsObj) { CardDetailsObj.SetCardNumber(AESObj.Encrypt(CardDetailsObj.GetName())); CardDetailsObj.SetCardNumber(AESObj.Encrypt(CardDetailsObj.GetCardNumber())); CardDetailsObj.SetExpiryMonth(AESObj.Encrypt(CardDetailsObj.GetExpiryMonth())); CardDetailsObj.SetExpiryYear(AESObj.Encrypt(CardDetailsObj.GetExpiryYear())); CardDetailsObj.SetCvv(AESObj.Encrypt(CardDetailsObj.GetCvv())); try { bool Response = new Security(UserProfileObj).AuthenticateUser(); if (Response == true) { if (0 == CardDetailsDataLayerObj.Update(CardDetailsObj)) { return(APIResponse.NOT_OK); } else { return(APIResponse.OK); } } else { return(APIResponse.NOT_AUTHENTICATED); } } catch (Exception ex) { Logger.Instance().Log(Fatal.Instance(), ex); throw ex; } }
public override List <IOrderBuilderResponse> BuildOrder() { try { List <IOrderBuilderResponse> Orders = new List <IOrderBuilderResponse>(); // fetching Order IDs DataSet OrdersID = new OrderDetailsDataLayer(UserProfileObj, OrderObj).FetchOrderDetailsByTypeAndStatus(); foreach (DataRow dr in OrdersID.Tables[0].Rows) { int OrderId = int.Parse(dr["oId"].ToString()); OrderObj.SetOrderID(OrderId); List <string> StoreLogoList = new List <string>(); OrderBuilderAbstract OrderBuilderObj = new OrderBuilder(UserProfileObj, OrderObj); StoreLogoList = OrderBuilderObj.BuildOrderStores(); DateTime OrderDate = OrderBuilderObj.BuildOrderDate(); int CurrentOrderId = OrderBuilderObj.BuildOrderId(); int ItemCount = OrderBuilderObj.BuildOrderItemCount(); double OrderAmount = OrderBuilderObj.BuildOrderAmount(); string Status = OrderBuilderObj.BuildOrderStatus(); BuilderResponseObj.SetStoreLogo(StoreLogoList); BuilderResponseObj.SetOrderDate(OrderDate); BuilderResponseObj.SetOrderID(CurrentOrderId); BuilderResponseObj.SetOrderItemCount(ItemCount); BuilderResponseObj.SetOrderAmount(OrderAmount); BuilderResponseObj.SetOrderStatus(Status); Orders.Add(BuilderResponseObj); } return(Orders); } catch (Exception ex) { Logger.Instance().Log(Fatal.Instance(), ex); throw ex; } }