コード例 #1
0
        public int AddCategory(CategoryDetails categoryDetails)
        {
            try
            {
                DALComponent objDALCategory = new DALComponent();
                objDALCategory.SetParameters("@categoryId", SqlDbType.Int, 4, categoryDetails.CategoryID);
                objDALCategory.SetParameters("@categoryName", SqlDbType.VarChar, 50, categoryDetails.CategoryName);
                objDALCategory.SetParameters("@categoryDesc", SqlDbType.VarChar, 300, categoryDetails.CategoryDescription);
                objDALCategory.SetParameters("@idvalue", SqlDbType.Int, true);
                objDALCategory.SqlCommandText = "[CreateCategory]";
                int x = objDALCategory.CreateRecord();
                object y = objDALCategory.GetParameters("@idvalue");
                if (categoryDetails.CategoryID != 0)
                    return categoryDetails.CategoryID;
                else
                    return Int32.Parse(y.ToString());

            }
            catch (SqlException sqlEx)
            {
                throw new ApplicationException("Data error=" + sqlEx.Message.ToString());
            }
            catch (Exception ex)
            {
                throw new ApplicationException("Error=" + ex.Message.ToString());
            }
        }
コード例 #2
0
 public bool ActivateVendor(int vendorId)
 {
     try
     {
         DALComponent objDALCon = new DALComponent();
         objDALCon.SetParameters("@vendorid", SqlDbType.Int, 4, vendorId);
         objDALCon.SqlCommandText = "[ActivateVendor]";
         int x = objDALCon.CreateRecord();
         return true;
     }
     catch (SqlException sqlEx)
     {
         throw new ApplicationException("Data error=" + sqlEx.Message.ToString());
     }
     catch (Exception ex)
     {
         throw new ApplicationException("Error=" + ex.Message.ToString());
     }
 }
コード例 #3
0
 public DataTable AvailableVenMail(string strEmail)
 {
     try
     {
         DALComponent objDAL = new DALComponent();
         objDAL.SetParameters("@email", SqlDbType.VarChar, 50, strEmail);
         objDAL.SqlCommandText = "[AvailableVenMail]";
         return (objDAL.SelectRecord());
     }
     catch (SqlException sqlEx)
     {
         throw new ApplicationException("Data error=" + sqlEx.Message.ToString());
     }
     catch (Exception ex)
     {
         throw new ApplicationException("Error=" + ex.Message.ToString());
     }
 }
コード例 #4
0
 public DataTable AvailableCategory(string strCategoryName)
 {
     try
     {
         DALComponent objDalComp = new DALComponent();
         objDalComp.SetParameters("@catname", SqlDbType.VarChar, 50, strCategoryName);
         objDalComp.SqlCommandText = "[AvailableCategory]";
         return objDalComp.SelectRecord();
     }
     catch (SqlException sqlEx)
     {
         throw new ApplicationException("Data error=" + sqlEx.Message.ToString());
     }
     catch (Exception ex)
     {
         throw new ApplicationException("Error=" + ex.Message.ToString());
     }
 }
コード例 #5
0
 public int AddVendorService(VendorServiceDetails vendorServDetails)
 {
     try
     {
         DALComponent objDALRegister = new DALComponent();
         objDALRegister.SetParameters("@VendorServiceId", SqlDbType.Int, 4, vendorServDetails.VendorServiceId);
         objDALRegister.SetParameters("@VendorId", SqlDbType.Int, 4, vendorServDetails.VendorId);
         objDALRegister.SetParameters("@CategoryId", SqlDbType.Int, 4, vendorServDetails.CategoryId);
         objDALRegister.SetParameters("@ServiceId", SqlDbType.Int, 4, vendorServDetails.ServiceId);
         objDALRegister.SetParameters("@Status", SqlDbType.VarChar, 25, vendorServDetails.Status);
         objDALRegister.SetParameters("@idvalue", SqlDbType.Int, true);
         objDALRegister.SqlCommandText = "[CreateVendorService]";
         int x = objDALRegister.CreateRecord();
         object y = objDALRegister.GetParameters("@idvalue");
         if (vendorServDetails.VendorServiceId != 0)
             return vendorServDetails.VendorServiceId;
         else
             return Int32.Parse(y.ToString());
     }
     catch (SqlException sqlEx)
     {
         throw new ApplicationException("Data error=" + sqlEx.Message.ToString());
     }
     catch (Exception ex)
     {
         throw new ApplicationException("Error=" + ex.Message.ToString());
     }
 }
コード例 #6
0
 public DataTable SelectVenMessageById(int intMsgId)
 {
     try
     {
         DALComponent objDALVenMsg = new DALComponent();
         objDALVenMsg.SetParameters("@msgid", SqlDbType.Int, 4, intMsgId);
         objDALVenMsg.SqlCommandText = "SelectVenMessageById";
         return objDALVenMsg.SelectRecord();
     }
     catch (SqlException sqlEx)
     {
         throw new ApplicationException("Data error=" + sqlEx.Message.ToString());
     }
     catch (Exception ex)
     {
         throw new ApplicationException("Error=" + ex.Message.ToString());
     }
 }
コード例 #7
0
 public int AddCustomerBankdet(CusBankDetails cusbankDetails)
 {
     try
     {
         DALComponent objDALRegister = new DALComponent();
         objDALRegister.SetParameters("@bankId", SqlDbType.Int, 4, cusbankDetails.BankId);
         objDALRegister.SetParameters("@customerId", SqlDbType.Int, 4, cusbankDetails.CustomerId);
         objDALRegister.SetParameters("@bankName", SqlDbType.VarChar, 200, cusbankDetails.BankName);
         objDALRegister.SetParameters("@cardholderName", SqlDbType.VarChar, 50, cusbankDetails.CardHolderName);
         objDALRegister.SetParameters("@creditcardNumber", SqlDbType.VarChar, 50, cusbankDetails.CreditCardNumber);
         objDALRegister.SetParameters("@cvcNumber", SqlDbType.VarChar, 50, cusbankDetails.CVCNumber);
         objDALRegister.SetParameters("@idvalue", SqlDbType.Int, true);
         objDALRegister.SqlCommandText = "[CreateBankDetails]";
         int x = objDALRegister.CreateRecord();
         object y = objDALRegister.GetParameters("@idvalue");
         if (cusbankDetails.BankId != 0)
             return cusbankDetails.BankId;
         else
             return Int32.Parse(y.ToString());
     }
     catch (SqlException sqlEx)
     {
         throw new ApplicationException("Data error=" + sqlEx.Message.ToString());
     }
     catch (Exception ex)
     {
         throw new ApplicationException("Error=" + ex.Message.ToString());
     }
 }
コード例 #8
0
 public DataTable GetVendorCountById(int intVendorId)
 {
     try
     {
         DALComponent objDalComp = new DALComponent();
         objDalComp.SetParameters("@vendorid", SqlDbType.Int, 4, intVendorId);
         objDalComp.SqlCommandText = "[GetVendorCount]";
         return objDalComp.SelectRecord();
     }
     catch (SqlException sqlEx)
     {
         throw new ApplicationException("Data error=" + sqlEx.Message.ToString());
     }
     catch (Exception ex)
     {
         throw new ApplicationException("Error=" + ex.Message.ToString());
     }
 }
コード例 #9
0
 public int AddService(ServiceDetails serviceDetails)
 {
     try
     {
         DALComponent objDALRegister = new DALComponent();
         objDALRegister.SetParameters("@serviceID", SqlDbType.Int, 4, serviceDetails.ServiceID);
         objDALRegister.SetParameters("@serviceName", SqlDbType.VarChar, 50, serviceDetails.ServiceName);
         objDALRegister.SetParameters("@serviceDesc", SqlDbType.VarChar, 300, serviceDetails.ServiceDescription);
         objDALRegister.SetParameters("@serviceKeyw", SqlDbType.VarChar, 300, serviceDetails.ServiceKeyword);
         objDALRegister.SetParameters("@categoryId", SqlDbType.Int, 4, serviceDetails.CategoryId);
         objDALRegister.SetParameters("@serviceType", SqlDbType.VarChar, 50, serviceDetails.ServiceType);
         objDALRegister.SetParameters("@priceRangeFrom", SqlDbType.VarChar, 50, serviceDetails.PriceRangeFrom);
         objDALRegister.SetParameters("@priceRangeTo", SqlDbType.VarChar, 50, serviceDetails.PriceRangeTo);
         objDALRegister.SetParameters("@noOfPair", SqlDbType.Int, 4, serviceDetails.NoOfPair);
         objDALRegister.SetParameters("@brandName", SqlDbType.VarChar, 50, serviceDetails.BrandName);
         objDALRegister.SetParameters("@brandType", SqlDbType.VarChar, 50, serviceDetails.BrandType);
         objDALRegister.SetParameters("@idvalue", SqlDbType.Int, true);
         objDALRegister.SqlCommandText = "[CreateService]";
         int x = objDALRegister.CreateRecord();
         object y = objDALRegister.GetParameters("@idvalue");
         if (serviceDetails.ServiceID != 0)
             return serviceDetails.ServiceID;
         else
             return Int32.Parse(y.ToString());
     }
     catch (SqlException sqlEx)
     {
         throw new ApplicationException("Data error=" + sqlEx.Message.ToString());
     }
     catch (Exception ex)
     {
         throw new ApplicationException("Error=" + ex.Message.ToString());
     }
 }
コード例 #10
0
 public int AddMembership(MembershipDetails membershipDetails)
 {
     try
     {
         DALComponent objDALRegister = new DALComponent();
         objDALRegister.SetParameters("@memberShipID", SqlDbType.Int, 4, membershipDetails.MemberShipID);
         objDALRegister.SetParameters("@memberShipName", SqlDbType.VarChar, 50, membershipDetails.MemberShipName);
         objDALRegister.SetParameters("@memberShipType", SqlDbType.NChar, 10, membershipDetails.MemberShipType);
         objDALRegister.SetParameters("@memberShipAmount", SqlDbType.Decimal, 9, membershipDetails.MemberShipAmount);
         objDALRegister.SetParameters("@memberShipDays", SqlDbType.Int, 4, membershipDetails.MemberShipDays);
         objDALRegister.SetParameters("@idvalue", SqlDbType.Int, true);
         objDALRegister.SqlCommandText = "[CreateMembership]";
         int x = objDALRegister.CreateRecord();
         object y = objDALRegister.GetParameters("@idvalue");
         if (membershipDetails.MemberShipID != 0)
             return membershipDetails.MemberShipID;
         else
             return Int32.Parse(y.ToString());
     }
     catch (SqlException sqlEx)
     {
         throw new ApplicationException("Data error=" + sqlEx.Message.ToString());
     }
     catch (Exception ex)
     {
         throw new ApplicationException("Error=" + ex.Message.ToString());
     }
 }
コード例 #11
0
 public int AddInquiryDetails(InquiryDetails quiryDetails)
 {
     try
     {
         DALComponent objDALRegister = new DALComponent();
         objDALRegister.SetParameters("@InquiryID", SqlDbType.Int, 4, quiryDetails.InquiryID);
         objDALRegister.SetParameters("@InquiryTitle", SqlDbType.VarChar, 100, quiryDetails.InquiryTitle);
         objDALRegister.SetParameters("@Description", SqlDbType.VarChar, 300, quiryDetails.Description);
         objDALRegister.SetParameters("@Keywords", SqlDbType.VarChar, 300, quiryDetails.Keywords);
         objDALRegister.SetParameters("@CategoryId", SqlDbType.Int, 4, quiryDetails.CategoryId);
         objDALRegister.SetParameters("@ServiceId", SqlDbType.Int, 4, quiryDetails.ServiceId);
         objDALRegister.SetParameters("@CustomerId", SqlDbType.Int, 4, quiryDetails.CustomerId);
         objDALRegister.SetParameters("@CityId", SqlDbType.Int, 4, quiryDetails.CityId);
         objDALRegister.SetParameters("@ImagePath", SqlDbType.VarChar, 500, quiryDetails.ImagePath);
         objDALRegister.SetParameters("@VideoPath", SqlDbType.VarChar, 200, quiryDetails.VideoPath);
         objDALRegister.SetParameters("@idvalue", SqlDbType.Int, true);
         objDALRegister.SqlCommandText = "[CreateInquiryDetails]";
         int x = objDALRegister.CreateRecord();
         object y = objDALRegister.GetParameters("@idvalue");
         if (quiryDetails.InquiryID != 0)
             return quiryDetails.InquiryID;
         else
             return Int32.Parse(y.ToString());
     }
     catch (SqlException sqlEx)
     {
         throw new ApplicationException("Data error=" + sqlEx.Message.ToString());
     }
     catch (Exception ex)
     {
         throw new ApplicationException("Error=" + ex.Message.ToString());
     }
 }
コード例 #12
0
 public int AddCustomerRegister(CustomerDetails customerDetails)
 {
     try
     {
         DALComponent objDALRegister = new DALComponent();
         objDALRegister.SetParameters("@CustomerID", SqlDbType.Int, 4, customerDetails.CustomerID);
         objDALRegister.SetParameters("@LoginName", SqlDbType.VarChar, 100, customerDetails.LoginName);
         objDALRegister.SetParameters("@ImagePath", SqlDbType.VarChar, 50, customerDetails.ImagePath);
         objDALRegister.SetParameters("@FirstName", SqlDbType.VarChar, 100, customerDetails.FirstName);
         objDALRegister.SetParameters("@LastName", SqlDbType.VarChar, 100, customerDetails.LastName);
         objDALRegister.SetParameters("@Gender", SqlDbType.Int, 4, customerDetails.Gender);
         objDALRegister.SetParameters("@LoginPassword", SqlDbType.VarChar, 50, customerDetails.LoginPassword);
         objDALRegister.SetParameters("@Email", SqlDbType.VarChar, 50, customerDetails.Email);
         objDALRegister.SetParameters("@Mobile", SqlDbType.VarChar, 50, customerDetails.Mobile);
         objDALRegister.SetParameters("@Address", SqlDbType.VarChar, 100, customerDetails.Address);
         objDALRegister.SetParameters("@StreetName", SqlDbType.VarChar, 50, customerDetails.StreetName);
         objDALRegister.SetParameters("@CityId", SqlDbType.Int, 4, customerDetails.CityId);
         objDALRegister.SetParameters("@StateId", SqlDbType.Int, 4, customerDetails.StateId);
         objDALRegister.SetParameters("@CountryId", SqlDbType.Int, 4, customerDetails.CountryId);
         objDALRegister.SetParameters("@ZipCode", SqlDbType.VarChar, 50, customerDetails.ZipCode);
         objDALRegister.SetParameters("@idvalue", SqlDbType.Int, true);
         objDALRegister.SqlCommandText = "[CreateCustomer]";
         int x = objDALRegister.CreateRecord();
         object y = objDALRegister.GetParameters("@idvalue");
         if (customerDetails.CustomerID != 0)
             return customerDetails.CustomerID;
         else
             return Int32.Parse(y.ToString());
     }
     catch (SqlException sqlEx)
     {
         throw new ApplicationException("Data error=" + sqlEx.Message.ToString());
     }
     catch (Exception ex)
     {
         throw new ApplicationException("Error=" + ex.Message.ToString());
     }
 }
コード例 #13
0
 public void UpdateVendorPassword(VendorDetails venDetails)
 {
     try
     {
         DALComponent objDAL = new DALComponent();
         objDAL.SetParameters("@vendorId", SqlDbType.Int, 4, venDetails.VendorID);
         objDAL.SetParameters("@password", SqlDbType.VarChar, 100, venDetails.LoginPassword);
         objDAL.SqlCommandText = "[UpdateVendorPassword]";
         int x = objDAL.UpdateRecord();
     }
     catch (SqlException sqlEx)
     {
         throw new ApplicationException("Data error=" + sqlEx.Message.ToString());
     }
     catch (Exception ex)
     {
         throw new ApplicationException("Error=" + ex.Message.ToString());
     }
 }
コード例 #14
0
 public void UpdateInquiryImages(InquiryDetails quiryDetails)
 {
     try
     {
         DALComponent objDAL = new DALComponent();
         objDAL.SetParameters("@inquiryId", SqlDbType.Int, 4, quiryDetails.InquiryID);
         objDAL.SetParameters("@imagepath", SqlDbType.VarChar, 500, quiryDetails.ImagePath);
         objDAL.SetParameters("@videopath", SqlDbType.VarChar, 200, quiryDetails.VideoPath);
         objDAL.SqlCommandText = "[UpdateInquiryImages]";
         int x = objDAL.UpdateRecord();
     }
     catch (SqlException sqlEx)
     {
         throw new ApplicationException("Data error=" + sqlEx.Message.ToString());
     }
     catch (Exception ex)
     {
         throw new ApplicationException("Error=" + ex.Message.ToString());
     }
 }
コード例 #15
0
 public void UpdateCustomerImage(CustomerDetails cusDetails)
 {
     try
     {
         DALComponent objDAL = new DALComponent();
         objDAL.SetParameters("@customerId", SqlDbType.Int, 4, cusDetails.CustomerID);
         objDAL.SetParameters("@imagepath", SqlDbType.VarChar, 100, cusDetails.ImagePath);
         objDAL.SqlCommandText = "[UpdateCustomerImage]";
         int x = objDAL.UpdateRecord();
     }
     catch (SqlException sqlEx)
     {
         throw new ApplicationException("Data error=" + sqlEx.Message.ToString());
     }
     catch (Exception ex)
     {
         throw new ApplicationException("Error=" + ex.Message.ToString());
     }
 }
コード例 #16
0
 public DataTable ForgotPasswordVen(string venEmail)
 {
     try
     {
         DALComponent objDALCon = new DALComponent();
         objDALCon.SetParameters("@email", SqlDbType.VarChar, 50, venEmail);
         objDALCon.SqlCommandText = "[SelectVendorByEmail]";
         return objDALCon.SelectRecord();
     }
     catch (SqlException sqlEx)
     {
         throw new ApplicationException("Data error=" + sqlEx.Message.ToString());
     }
     catch (Exception ex)
     {
         throw new ApplicationException("Error=" + ex.Message.ToString());
     }
 }
コード例 #17
0
 public int AddVendorArea(VendorAreaDetails vendorAreaDetails)
 {
     try
     {
         DALComponent objDALArea = new DALComponent();
         objDALArea.SetParameters("@vendorAreaId", SqlDbType.Int, 4, vendorAreaDetails.VendorAreaID);
         objDALArea.SetParameters("@vendorId", SqlDbType.Int, 4, vendorAreaDetails.VendorId);
         objDALArea.SetParameters("@city", SqlDbType.VarChar, 50, vendorAreaDetails.VACityName);
         objDALArea.SetParameters("@state", SqlDbType.VarChar, 50, vendorAreaDetails.VAState);
         objDALArea.SetParameters("@zipcode", SqlDbType.VarChar, 50, vendorAreaDetails.VAZipcode);
         objDALArea.SetParameters("@distance", SqlDbType.VarChar, 50, vendorAreaDetails.VADistance);
         objDALArea.SetParameters("@idvalue", SqlDbType.Int, true);
         objDALArea.SqlCommandText = "[CreateVendorArea]";
         int x = objDALArea.CreateRecord();
         object y = objDALArea.GetParameters("@idvalue");
         if (vendorAreaDetails.VendorAreaID != 0)
             return vendorAreaDetails.VendorAreaID;
         else
             return Int32.Parse(y.ToString());
     }
     catch (SqlException sqlEx)
     {
         throw new ApplicationException("Data error=" + sqlEx.Message.ToString());
     }
     catch (Exception ex)
     {
         throw new ApplicationException("Error=" + ex.Message.ToString());
     }
 }
コード例 #18
0
 public int AddVendorMessage(VendorMessageDetails vendorMsgDetails)
 {
     try
     {
         DALComponent objDALVenMsg = new DALComponent();
         objDALVenMsg.SetParameters("@VendorMessageId", SqlDbType.Int, 4, vendorMsgDetails.VendorMessageId);
         objDALVenMsg.SetParameters("@QuiryId", SqlDbType.Int, 4, vendorMsgDetails.QuiryId);
         objDALVenMsg.SetParameters("@SendCustomerId", SqlDbType.Int, 4, vendorMsgDetails.SendCustomerId);
         objDALVenMsg.SetParameters("@VendorId", SqlDbType.Int, 4, vendorMsgDetails.VendorId);
         objDALVenMsg.SetParameters("@CategoryId", SqlDbType.Int, 4, vendorMsgDetails.CategoryId);
         objDALVenMsg.SetParameters("@MessageTitle", SqlDbType.VarChar, 100, vendorMsgDetails.MessageTitle);
         objDALVenMsg.SetParameters("@Description", SqlDbType.VarChar, 1000, vendorMsgDetails.Description);
         objDALVenMsg.SetParameters("@Status", SqlDbType.VarChar, 10, vendorMsgDetails.Status);
         objDALVenMsg.SetParameters("@idvalue", SqlDbType.Int, true);
         objDALVenMsg.SqlCommandText = "[CreateVendorMessage]";
         int x = objDALVenMsg.CreateRecord();
         object y = objDALVenMsg.GetParameters("@idvalue");
         if (vendorMsgDetails.VendorMessageId != 0)
             return vendorMsgDetails.VendorMessageId;
         else
             return Int32.Parse(y.ToString());
     }
     catch (SqlException sqlEx)
     {
         throw new ApplicationException("Data error=" + sqlEx.Message.ToString());
     }
     catch (Exception ex)
     {
         throw new ApplicationException("Error=" + ex.Message.ToString());
     }
 }
コード例 #19
0
 public int LoginVendor(LoginDetails loginDetails)
 {
     try
     {
         DALComponent objDALLog = new DALComponent();
         objDALLog.SetParameters("@loginName", SqlDbType.VarChar, 50, loginDetails.UserName);
         objDALLog.SetParameters("@loginPassword", SqlDbType.VarChar, 50, loginDetails.UserPassword);
         objDALLog.SqlCommandText = "[ValidateVendor]";
         object y = objDALLog.SelectRecordValue();
         if (int.Parse(y.ToString()) > 0)
             return int.Parse(y.ToString());
         else
             return 0;
     }
     catch (SqlException sqlEx)
     {
         throw new ApplicationException(sqlEx.Message.ToString());
     }
     catch (Exception ex)
     {
         throw new ApplicationException("Error=" + ex.Message.ToString());
     }
 }
コード例 #20
0
 public int AddVendorRegister(VendorDetails vendorDetails)
 {
     try
     {
         DALComponent objDALRegister = new DALComponent();
         objDALRegister.SetParameters("@VendorID", SqlDbType.Int, 4, vendorDetails.VendorID);
         objDALRegister.SetParameters("@LoginName", SqlDbType.VarChar, 50, vendorDetails.LoginName);
         objDALRegister.SetParameters("@LoginPassword", SqlDbType.VarChar, 50, vendorDetails.LoginPassword);
         objDALRegister.SetParameters("@VendorName", SqlDbType.VarChar, 50, vendorDetails.VendorName);
         objDALRegister.SetParameters("@VendorAddress", SqlDbType.VarChar, 50, vendorDetails.VendorAddress);
         objDALRegister.SetParameters("@VendorStreet", SqlDbType.VarChar, 50, vendorDetails.VendorStreet);
         objDALRegister.SetParameters("@VendorCityId", SqlDbType.Int, 4, vendorDetails.VendorCityId);
         objDALRegister.SetParameters("@VendorStateId", SqlDbType.Int, 4, vendorDetails.VendorStateId);
         objDALRegister.SetParameters("@VendorCountryId", SqlDbType.Int, 4, vendorDetails.VendorCountryId);
         objDALRegister.SetParameters("@VendorZipcode", SqlDbType.VarChar, 50, vendorDetails.VendorZipcode);
         objDALRegister.SetParameters("@VendorEmail", SqlDbType.VarChar, 50, vendorDetails.VendorEmail);
         objDALRegister.SetParameters("@VendorMobile", SqlDbType.VarChar, 50, vendorDetails.VendorMobile);
         objDALRegister.SetParameters("@VendorBusinessPhone", SqlDbType.VarChar, 50, vendorDetails.VendorBusinessPhone);
         objDALRegister.SetParameters("@CompanyName", SqlDbType.VarChar, 50, vendorDetails.CompanyName);
         objDALRegister.SetParameters("@OwnerName", SqlDbType.VarChar, 50, vendorDetails.OwnerName);
         objDALRegister.SetParameters("@ContactName", SqlDbType.VarChar, 50, vendorDetails.ContactName);
         objDALRegister.SetParameters("@ContactNumber", SqlDbType.VarChar, 50, vendorDetails.ContactNumber);
         objDALRegister.SetParameters("@CategoryId", SqlDbType.Int, 4, vendorDetails.CategoryId);
         objDALRegister.SetParameters("@CoverageArea", SqlDbType.VarChar, 50, vendorDetails.CoverageArea);
         objDALRegister.SetParameters("@WebsiteUrl", SqlDbType.VarChar, 50, vendorDetails.WebsiteUrl);
         objDALRegister.SetParameters("@GeoCode", SqlDbType.VarChar, 50, vendorDetails.GeoCode);
         objDALRegister.SetParameters("@MemberShipId", SqlDbType.Int, 4, vendorDetails.MemberShipId);
         objDALRegister.SetParameters("@CreditCardNumber", SqlDbType.VarChar, 50, vendorDetails.CreditCardNumber);
         objDALRegister.SetParameters("@CreditCardType", SqlDbType.VarChar, 50, vendorDetails.CreditCardType);
         objDALRegister.SetParameters("@CreditCardExpired", SqlDbType.VarChar, 50, vendorDetails.CreditCardExpired);
         objDALRegister.SetParameters("@CVCNumber", SqlDbType.VarChar, 50, vendorDetails.CVCNumber);
         objDALRegister.SetParameters("@idvalue", SqlDbType.Int, true);
         objDALRegister.SqlCommandText = "[CreateVendor]";
         int x = objDALRegister.CreateRecord();
         object y = objDALRegister.GetParameters("@idvalue");
         if (vendorDetails.VendorID != 0)
             return vendorDetails.VendorID;
         else
             return Int32.Parse(y.ToString());
     }
     catch (SqlException sqlEx)
     {
         throw new ApplicationException("Data error=" + sqlEx.Message.ToString());
     }
     catch (Exception ex)
     {
         throw new ApplicationException("Error=" + ex.Message.ToString());
     }
 }
コード例 #21
0
 public DataTable SelectCityByStateId(int intStateId)
 {
     try
     {
         DALComponent objDalComp = new DALComponent();
         objDalComp.SetParameters("@stateId", SqlDbType.Int, 4, intStateId);
         objDalComp.SqlCommandText = "[SelectCityByStateId]";
         return objDalComp.SelectRecord();
     }
     catch (SqlException sqlEx)
     {
         throw new ApplicationException("Data error=" + sqlEx.Message.ToString());
     }
     catch (Exception ex)
     {
         throw new ApplicationException("Error=" + ex.Message.ToString());
     }
 }
コード例 #22
0
 public DataTable SelectVendorByCategory(int categoryId)
 {
     try
     {
         DALComponent objDalComp = new DALComponent();
         objDalComp.SetParameters("@cateid", SqlDbType.Int, 4, categoryId);
         objDalComp.SqlCommandText = "[SelectVendorByCatid]";
         return objDalComp.SelectRecord();
     }
     catch (SqlException sqlEx)
     {
         throw new ApplicationException("Data error=" + sqlEx.Message.ToString());
     }
     catch (Exception ex)
     {
         throw new ApplicationException("Error=" + ex.Message.ToString());
     }
 }