private void InsertUpdateCollegeTestimonial(int testimonialId)
 {
     try
     {
         var errMsg = "";
         var objAdmissionJankariTestimonial = new AdmissionJankariTestimonial
         {
             TestimonialId               = testimonialId,
             TestimonialPersonName       = txtPersonName.Text.Trim(),
             TestimonialPeronDesignation = txtPersondesig.Text.Trim(),
             TestimonialImage            = hdnImageFile.Value.Trim(),
             TestimonialPriority         = txtPriority.Text,
             TestimonialStatus           = chkTestimonialStatus.Checked,
             TestimonialText             = txtTestimonial.FckValue
         };
         var result = UserManagerProvider.Instance.InsertUpdateTestimonialAdmssionjankari(objAdmissionJankariTestimonial, new SecurePage().LoggedInUserId, out errMsg);
         lblResult.Text    = errMsg;
         lblResult.Visible = true;
         if (result > 0)
         {
             ClearFields();
             BindTestimonial();
             lblResult.CssClass = "success";
         }
         else
         {
             lblResult.CssClass = "error";
         }
     }
     catch (Exception ex)
     {
         var err = ex.Message;
         if (ex.InnerException != null)
         {
             err = err + " :: Inner Exception :- " + ex.ToString();
         }
         const string addInfo = "Error while executing btnSave_Click in AdminPanel/AdmissionjanklariTestimonial.aspx  :: -> ";
         var          objPub  = new ClsExceptionPublisher();
         objPub.Publish(err, addInfo);
     }
 }
Beispiel #2
0
        public override int InsertUpdateTestimonialAdmssionjankari(AdmissionJankariTestimonial objAdmissionJankariTestimonial, int createdBy, out string errMsg)
        {
            _objDataWrapper = new DbWrapper(Common.CnnString, CommandType.StoredProcedure);
            errMsg          = "";
            try
            {
                _objDataWrapper.AddParameter("@TestimonialId", objAdmissionJankariTestimonial.TestimonialId);
                _objDataWrapper.AddParameter("@TestimonialPersonName", objAdmissionJankariTestimonial.TestimonialPersonName);
                _objDataWrapper.AddParameter("@TestimonialPersonDesgination", objAdmissionJankariTestimonial.TestimonialPeronDesignation);
                _objDataWrapper.AddParameter("@TestimonialPriority", objAdmissionJankariTestimonial.TestimonialPriority);
                _objDataWrapper.AddParameter("@TestimonialText", objAdmissionJankariTestimonial.TestimonialText);
                _objDataWrapper.AddParameter("@TestimonialStatus", objAdmissionJankariTestimonial.TestimonialStatus);
                _objDataWrapper.AddParameter("@TestimonialPersonImage", objAdmissionJankariTestimonial.TestimonialImage);
                _objDataWrapper.AddParameter("@CreatedBy", createdBy);

                var ObjerrMsg =
                    (SqlParameter)(_objDataWrapper.AddParameter("@ErrMsg", "", SqlDbType.VarChar, ParameterDirection.Output, 128));
                _i = _objDataWrapper.ExecuteNonQuery("Aj_Proc_InsertUpdateAdmissionjankariTestimonial");
                if (ObjerrMsg != null && ObjerrMsg.Value != null)
                {
                    errMsg = Convert.ToString(ObjerrMsg.Value);
                }
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.ToString();
                }
                const string addInfo = "Error while executing InsertUpdateTestimonialAdmssionjankari in UserManager.cs  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
            return(_i);
        }
Beispiel #3
0
 public abstract int InsertUpdateTestimonialAdmssionjankari(AdmissionJankariTestimonial objUserCategoryProperty, int createdOn, out string errMsg);