/// <summary>
        /// Function to view details based on parameter
        /// </summary>
        /// <param name="decServiceCategoryId"></param>
        /// <returns></returns>
        public ServiceCategoryInfo ServiceCategoryWithNarrationView(decimal decServiceCategoryId)
        {
            ServiceCategoryInfo ServiceCategoryinfo = new ServiceCategoryInfo();

            try
            {
                ServiceCategoryinfo = spServiceCatogory.ServiceCategoryWithNarrationView(decServiceCategoryId);
            }
            catch (Exception ex)
            {
                MessageBox.Show("SC7:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            return(ServiceCategoryinfo);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Function to fill controlls to edit or delete
 /// </summary>
 public void FillControls()
 {
     try
     {
         ServiceCategoryInfo infoServiceCategory = new ServiceCategoryInfo();
         ServiceCategorySP   spServiceCategory   = new ServiceCategorySP();
         infoServiceCategory     = spServiceCategory.ServiceCategoryWithNarrationView(Convert.ToDecimal(dgvServiceCategory.CurrentRow.Cells[1].Value.ToString()));
         txtServiceCategory.Text = infoServiceCategory.CategoryName;
         txtNarration.Text       = infoServiceCategory.Narration;
         btnSave.Text            = "Update";
         btnDelete.Enabled       = true;
         strCategoryName         = infoServiceCategory.CategoryName;
         decCategoryName         = infoServiceCategory.ServicecategoryId;
     }
     catch (Exception ex)
     {
         MessageBox.Show("SC8" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }