Ejemplo n.º 1
0
        public void ExceptionLoggin(string ControllerName, string ActionName, string ErrorMessage)
        {
            using (DbCommand objDbCommand = DBAccessHelper.GetDBCommand(ConnectionManager.DatabaseToConnect.RaiteRajuDefaultInstance, StoredProcedures.SPEXCEPTIONLOGGING))
            {
                DBAccessHelper.AddInputParametersWithValues(objDbCommand, DataAccessConstants.ParamControllerName, DbType.String, ControllerName);
                DBAccessHelper.AddInputParametersWithValues(objDbCommand, DataAccessConstants.ParamActionName, DbType.String, ActionName);
                DBAccessHelper.AddInputParametersWithValues(objDbCommand, DataAccessConstants.ParamExceptionMessage, DbType.String, ErrorMessage);

                DBAccessHelper.ExecuteNonQuery(objDbCommand);
            }
        }
Ejemplo n.º 2
0
        public int DeleteUserAccount(Int64 BigIntPhoneNumber)
        {
            int Success = 0;

            try
            {
                using (DbCommand objDbCommand = DBAccessHelper.GetDBCommand(ConnectionManager.DatabaseToConnect.RaiteRajuDefaultInstance, StoredProcedures.SPDELETEUSERACCOUNT))
                {
                    DBAccessHelper.AddInputParametersWithValues(objDbCommand, DataAccessConstants.ParamPhoneNumber, DbType.Int64, BigIntPhoneNumber);
                    Success = DBAccessHelper.ExecuteNonQuery(objDbCommand);
                }
                return(Success);
            }
            catch (Exception ex)
            {
                ExceptionLoggin("ManagementDal", "DeleteUserAccount", ex.Message);
                return(0);
            }
        }
Ejemplo n.º 3
0
        public int VerifySelectedAds(string SelectedAds)
        {
            int Success = 0;

            try
            {
                using (DbCommand objDbCommand = DBAccessHelper.GetDBCommand(ConnectionManager.DatabaseToConnect.RaiteRajuDefaultInstance, StoredProcedures.SPVerifyAds))
                {
                    DBAccessHelper.AddInputParametersWithValues(objDbCommand, DataAccessConstants.ParamAdIdS, DbType.String, SelectedAds);
                    Success = DBAccessHelper.ExecuteNonQuery(objDbCommand);
                }
            }
            catch (Exception ex)
            {
                ExceptionLoggin("ManagementDal", "VerifySelectedAds", ex.Message);
                Success = 0;
            }
            return(Success);
        }
Ejemplo n.º 4
0
        public int InsertReview(Int64 PhoneNumber, String reviewDescription)
        {
            int Success = 0;

            try
            {
                using (DbCommand objDbCommand = DBAccessHelper.GetDBCommand(ConnectionManager.DatabaseToConnect.RaiteRajuDefaultInstance, StoredProcedures.SPInsertReview))
                {
                    DBAccessHelper.AddInputParametersWithValues(objDbCommand, DataAccessConstants.ParamPhoneNumber, DbType.Int64, PhoneNumber);
                    DBAccessHelper.AddInputParametersWithValues(objDbCommand, DataAccessConstants.PARAMReview, DbType.String, reviewDescription);
                    Success = DBAccessHelper.ExecuteNonQuery(objDbCommand);
                }
                return(Success);
            }
            catch (Exception ex)
            {
                ExceptionLoggin("ManagementDal", "InsertReview", ex.Message);
                return(0);
            }
        }
Ejemplo n.º 5
0
        public int insertContactUs(ContactUsEntity ENTITY)
        {
            int Success = 0;

            try
            {
                using (DbCommand objDbCommand = DBAccessHelper.GetDBCommand(ConnectionManager.DatabaseToConnect.RaiteRajuDefaultInstance, StoredProcedures.SPInsertContactUs))
                {
                    DBAccessHelper.AddInputParametersWithValues(objDbCommand, DataAccessConstants.ParamPhoneNumber, DbType.Int64, ENTITY.PhoneNumber);
                    DBAccessHelper.AddInputParametersWithValues(objDbCommand, DataAccessConstants.PARAMSubject, DbType.String, ENTITY.Subject);
                    DBAccessHelper.AddInputParametersWithValues(objDbCommand, DataAccessConstants.PARAMDescription, DbType.String, ENTITY.Description);
                    Success = DBAccessHelper.ExecuteNonQuery(objDbCommand);
                }
                return(Success);
            }
            catch (Exception ex)
            {
                ExceptionLoggin("ManagementDal", "insertContactUs", ex.Message);
                return(0);
            }
        }
Ejemplo n.º 6
0
 public void UpdateAdDetails(AdDetailsEntity Obj)
 {
     try
     {
         using (DbCommand objDbCommand = DBAccessHelper.GetDBCommand(ConnectionManager.DatabaseToConnect.RaiteRajuDefaultInstance, StoredProcedures.SPUPDATEADDETAILS))
         {
             DBAccessHelper.AddInputParametersWithValues(objDbCommand, DataAccessConstants.ParamAdId, DbType.String, Obj.AdID);
             // DBAccessHelper.AddInputParametersWithValues(objDbCommand, DataAccessConstants.ParamAdTitle, DbType.String, Obj.Title);
             DBAccessHelper.AddInputParametersWithValues(objDbCommand, DataAccessConstants.ParamAdCategory, DbType.String, Obj.Category);
             DBAccessHelper.AddInputParametersWithValues(objDbCommand, DataAccessConstants.ParamSubCategoryName, DbType.String, Obj.txtSubCategoryName);
             DBAccessHelper.AddInputParametersWithValues(objDbCommand, DataAccessConstants.ParamAdDescription, DbType.String, Obj.AdDescription);
             DBAccessHelper.AddInputParametersWithValues(objDbCommand, DataAccessConstants.ParamPrice, DbType.String, Obj.Price);
             DBAccessHelper.AddInputParametersWithValues(objDbCommand, DataAccessConstants.ParamQuantity, DbType.String, Obj.Quantity);
             DBAccessHelper.AddInputParametersWithValues(objDbCommand, DataAccessConstants.ParamSellingUnit, DbType.String, Obj.SellingUnit);
             DBAccessHelper.ExecuteNonQuery(objDbCommand);
         }
     }
     catch (Exception ex)
     {
         ExceptionLoggin("ManagementDal", "UpdateAdDetails", ex.Message);
     }
 }
Ejemplo n.º 7
0
        public int SPInsertAdViewsStatistics(AdDetailsEntity Entity)
        {
            int Success = 0;

            try
            {
                using (DbCommand objDbCommand = DBAccessHelper.GetDBCommand(ConnectionManager.DatabaseToConnect.RaiteRajuDefaultInstance, StoredProcedures.SPInsertAdViewsStatistics))
                {
                    DBAccessHelper.AddInputParametersWithValues(objDbCommand, DataAccessConstants.ParamUserId, DbType.Int32, Entity.UserID);
                    DBAccessHelper.AddInputParametersWithValues(objDbCommand, DataAccessConstants.ParamPhoneNumber, DbType.Int64, Entity.MobileNumber);
                    DBAccessHelper.AddInputParametersWithValues(objDbCommand, DataAccessConstants.ParamAdId, DbType.Int32, Entity.AdID);

                    Success = DBAccessHelper.ExecuteNonQuery(objDbCommand);
                }
            }
            catch (Exception ex)
            {
                ExceptionLoggin("ManagementDal", "SPInsertAdViewsStatistics", ex.Message);
                Success = 0;
            }

            return(Success);
        }