public void CreateAdImageDetails(int imageId, int adpostId, string imagePath, string videoLink) { try { dalComponent = new DALComponent(); dalComponent.SetParameters("@imageId", SqlDbType.Int, 4, imageId); dalComponent.SetParameters("@adpostId", SqlDbType.Int, 4, adpostId); dalComponent.SetParameters("@imagePath", SqlDbType.VarChar, 1000, imagePath); dalComponent.SetParameters("@videoLink", SqlDbType.VarChar, 1000, videoLink); dalComponent.SetParameters("@idvalue", SqlDbType.Int, true); dalComponent.SqlCommandText = "CreateAdImageDetails"; int x = dalComponent.CreateRecord(); object y = dalComponent.GetParameters("@idvalue"); //int adpost_id = Int32.Parse(y.ToString()); //if (imageId != 0) // return imageId; //else // return Int32.Parse(y.ToString()); } catch (Exception ex) { throw; } }
public DataTable SelectCityByName(string cityname) { DALComponent dalCom = new DALComponent(); dalCom.SetParameters("@cityname", SqlDbType.VarChar, 50, cityname); dalCom.SqlCommandText = "[SelectCityByName]"; return dalCom.SelectRecord(); }
public DataTable SelectChargeDetailsByID(int chargeId) { DALComponent dalComponent = new DALComponent(); dalComponent.SetParameters("@chargeId", SqlDbType.Int, 4, chargeId); dalComponent.SqlCommandText = "[SelectChargeDetailsByID]"; return dalComponent.SelectRecord(); }
public DataTable SelectCityById(int cityid) { DALComponent dalCom = new DALComponent(); dalCom.SetParameters("@cityid", SqlDbType.Int, 4, cityid); dalCom.SqlCommandText = "[SelectCityById]"; return dalCom.SelectRecord(); }
public void CreateBuyDetails(int adpostId, int historyId, int userId, decimal totalprice, int delitype, int cityId, string currentstatus, int viewcount, string chargeName, int chargeType, double chargeAmount) { try { DALComponent dalComponent = new DALComponent(); dalComponent.SetParameters("@adpostId", SqlDbType.Int, 4, adpostId); dalComponent.SetParameters("@historyId", SqlDbType.Int, 4, historyId); dalComponent.SetParameters("@userId", SqlDbType.Int, 4, userId); dalComponent.SetParameters("@totalprice", SqlDbType.Decimal, 9, totalprice); dalComponent.SetParameters("@delitype", SqlDbType.Int, 4, delitype); dalComponent.SetParameters("@cityId", SqlDbType.Int, 4, cityId); dalComponent.SetParameters("@currentstatus", SqlDbType.VarChar, 50, currentstatus); dalComponent.SetParameters("@viewcount", SqlDbType.Int, 4, viewcount); dalComponent.SetParameters("@chargeName", SqlDbType.VarChar, 50, chargeName); dalComponent.SetParameters("@chargeType", SqlDbType.Int, 4, chargeType); dalComponent.SetParameters("@chargeAmount", SqlDbType.Float, 9, chargeAmount); dalComponent.SetParameters("@idvalue", SqlDbType.Int, true); dalComponent.SqlCommandText = "[CreateBuyDetails]"; int x = dalComponent.CreateRecord(); object y = dalComponent.GetParameters("@idvalue"); } catch (Exception ex) { throw; } }
public DataTable AvailableCategoryGroup(string groupName) { try { DALComponent dalComponent = new DALComponent(); dalComponent.SetParameters("@groupname", SqlDbType.VarChar, 50, groupName); dalComponent.SqlCommandText = "[AvailableCategoryGroup]"; return dalComponent.SelectRecord(); } catch (Exception ex) { throw; } }
public void AdPostDeleteById(int adpostId) { try { dalComponent = new DALComponent(); dalComponent.SetParameters("@adpostId", SqlDbType.Int, 4, adpostId); dalComponent.SqlCommandText = "AdPostDeleteById"; int x = dalComponent.DeleteRecord(); } catch (Exception) { throw; } }
public void CategoryGroupDelete(int catid) { try { DALComponent dalComponent = new DALComponent(); dalComponent.SetParameters("@categoryGroupId", SqlDbType.Int, 4, catid); dalComponent.SqlCommandText = "CategoryGroupDelete"; int x = dalComponent.DeleteRecord(); } catch (Exception) { throw; } }
public void ChargeDetailsDelete(int chargeId) { try { DALComponent dalComponent = new DALComponent(); dalComponent.SetParameters("@chargeId", SqlDbType.Int, 4, chargeId); dalComponent.SqlCommandText = "[ChargeDetailsDelete]"; int x = dalComponent.DeleteRecord(); } catch (Exception) { throw; } }
public int CategoryGroupUpdate(int catid, string catname) { try { DALComponent dalComponent = new DALComponent(); dalComponent.SetParameters("@categoryGroupId", SqlDbType.Int, 4, catid); dalComponent.SetParameters("@categoryGroupName", SqlDbType.VarChar, 100, catname); dalComponent.SqlCommandText = "CategoryGroupUpdate"; int x = dalComponent.CreateRecord(); return x; } catch (Exception) { throw; } return 0; }
public void CreateUserCart(int cartId, int userId, int adpostId) { try { DALComponent dalComponent = new DALComponent(); dalComponent.SetParameters("@cartId", SqlDbType.Int, 4, cartId); dalComponent.SetParameters("@userId", SqlDbType.Int, 4, userId); dalComponent.SetParameters("@adpostId", SqlDbType.Int, 4, adpostId); dalComponent.SetParameters("@idvalue", SqlDbType.Int, true); dalComponent.SqlCommandText = "CreateUserCart"; int x = dalComponent.CreateRecord(); object y = dalComponent.GetParameters("@idvalue"); } catch (Exception ex) { throw; } }
public int CreateChargeDetails(int chargeId, int userId, string chargeName, int chargeType, double amtorpercent) { try { DALComponent dalComponent = new DALComponent(); dalComponent.SetParameters("@userId", SqlDbType.Int, 4, userId); dalComponent.SetParameters("@chargeId", SqlDbType.Int, 4, chargeId); dalComponent.SetParameters("@chargeName", SqlDbType.VarChar, 50, chargeName); dalComponent.SetParameters("@chargeType", SqlDbType.Int, 4, chargeType); dalComponent.SetParameters("@amtorpercent", SqlDbType.Float,18, amtorpercent); dalComponent.SetParameters("@idvalue", SqlDbType.Int, true); dalComponent.SqlCommandText = "[CreateChargeDetails]"; int x = dalComponent.CreateRecord(); return x; } catch (Exception) { throw; } return 0; }
public int CreateAdPost(int adpostId, string adpostTitle, string description, string keywords, int userId, int categoryId, decimal price, int stateId, int cityId, int countryId, string zipCode, DateTime adtillDate, string adStatus, int paidStatus) { try { dalComponent = new DALComponent(); dalComponent.SetParameters("@adpostId", SqlDbType.Int, 4, adpostId); dalComponent.SetParameters("@adpostTitle", SqlDbType.VarChar, 500, adpostTitle); dalComponent.SetParameters("@description", SqlDbType.VarChar, 1000, description); dalComponent.SetParameters("@keywords", SqlDbType.VarChar, 1000, keywords); dalComponent.SetParameters("@userId", SqlDbType.Int, 4, userId); dalComponent.SetParameters("@categoryId", SqlDbType.Int, 4, categoryId); dalComponent.SetParameters("@price", SqlDbType.Decimal, 9, price); dalComponent.SetParameters("@stateId", SqlDbType.Int, 4, stateId); dalComponent.SetParameters("@cityId", SqlDbType.Int, 4, cityId); dalComponent.SetParameters("@countryId", SqlDbType.Int, 4, countryId); dalComponent.SetParameters("@zipCode", SqlDbType.VarChar, 50, zipCode); dalComponent.SetParameters("@adtillDate", SqlDbType.SmallDateTime, 4, adtillDate); dalComponent.SetParameters("@adStatus", SqlDbType.VarChar, 50, adStatus); dalComponent.SetParameters("@paidStatus", SqlDbType.Int, 4, paidStatus); dalComponent.SetParameters("@idvalue", SqlDbType.Int, true); dalComponent.SqlCommandText = "CreateAdPost"; int x = dalComponent.CreateRecord(); object y = dalComponent.GetParameters("@idvalue"); if (adpostId != 0) return adpostId; else return Int32.Parse(y.ToString()); } catch (Exception ex) { throw; } }
public UserInfoBll() { dalComponent = new DALComponent(); }
public DataTable SearchUsers(string Keyword) { try { dalComponent = new DALComponent(); dalComponent.SetParameters("@Keyword", SqlDbType.VarChar, 200, Keyword); dalComponent.SqlCommandText = "SearchUsers"; return dalComponent.SelectRecord(); } catch (Exception ex) { throw; } }
public DataTable GetAdImageDetails(int adpostId, int userId) { dalComponent = new DALComponent(); dalComponent.SetParameters("@adpostId", SqlDbType.Int, 4, adpostId); dalComponent.SetParameters("@userId", SqlDbType.Int, 4, userId); dalComponent.SqlCommandText = "[GetAdImageDetails]"; return dalComponent.SelectRecord(); }
public DataTable GetAllAdDetails() { dalComponent = new DALComponent(); dalComponent.SqlCommandText = "[GetAllAdDetails]"; return dalComponent.SelectRecord(); }
public DataTable SelectReportsByCity(string cityname) { dalComponent = new DALComponent(); dalComponent.SetParameters("@cityname", SqlDbType.VarChar, 50, cityname); dalComponent.SqlCommandText = "[SelectReportsByCity]"; return dalComponent.SelectRecord(); }
public DataTable SelectCategoryGroup() { DALComponent dalComponent = new DALComponent(); dalComponent.SqlCommandText = "SelectCategoryGroup"; return dalComponent.SelectRecord(); }
public void UpdateCartStatus(int adpostId, int userid) { try { DALComponent dalComponent = new DALComponent(); dalComponent.SetParameters("@adpostid", SqlDbType.Int, 4, adpostId); dalComponent.SetParameters("@userid", SqlDbType.Int, 4, userid); dalComponent.SqlCommandText = "[UpdateCartStatus]"; int x = dalComponent.CreateRecord(); } catch (Exception ex) { throw; } }
public DataTable SelectUserCartDetails(int userId) { DALComponent dalComponent = new DALComponent(); dalComponent.SetParameters("@userId", SqlDbType.Int, 4, userId); dalComponent.SqlCommandText = "SelectUserCartDetails"; return dalComponent.SelectRecord(); }
public DataTable SelectMaxID() { DALComponent dalComponent = new DALComponent(); dalComponent.SqlCommandText = "SelectMaxID"; return dalComponent.SelectRecord(); }
public DataTable SelectReportsByDate(DateTime FromDate,DateTime ToDate) { dalComponent = new DALComponent(); dalComponent.SetParameters("@fromdate", SqlDbType.SmallDateTime, 4, FromDate); dalComponent.SetParameters("@todate", SqlDbType.SmallDateTime, 4, ToDate); dalComponent.SqlCommandText = "[SelectReportsByDate]"; return dalComponent.SelectRecord(); }
public DataTable SelectUserAds(int userId) { dalComponent = new DALComponent(); dalComponent.SetParameters("@userId", SqlDbType.Int, 4, userId); dalComponent.SqlCommandText = "[SelectUserAds]"; return dalComponent.SelectRecord(); }
public AdDetailsBll() { dalComponent = new DALComponent(); }
public DataTable SelectChargeDetails() { DALComponent dalComponent = new DALComponent(); dalComponent.SqlCommandText = "[SelectChargeDetails]"; return dalComponent.SelectRecord(); }
public DataTable SelectCountry() { DALComponent dalCom = new DALComponent(); dalCom.SqlCommandText = "SelectCountry"; return dalCom.SelectRecord(); }