public static CustomList <AccReportConfigurationHead> GetAllAccReportConfigurationHead(Int32 ReportTypeID)
        {
            ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
            CustomList <AccReportConfigurationHead> AccReportConfigurationHeadCollection = new CustomList <AccReportConfigurationHead>();
            IDataReader reader = null;
            String      sql    = "Exec spGetHeadCategoryMap " + ReportTypeID;

            try
            {
                conManager.OpenDataReader(sql, out reader);
                while (reader.Read())
                {
                    AccReportConfigurationHead newAccReportConfigurationHead = new AccReportConfigurationHead();
                    newAccReportConfigurationHead.SetData(reader);
                    AccReportConfigurationHeadCollection.Add(newAccReportConfigurationHead);
                }
                return(AccReportConfigurationHeadCollection);
            }
            catch (Exception ex)
            {
                throw (ex);
            }
            finally
            {
                if (reader != null && !reader.IsClosed)
                {
                    reader.Close();
                }
            }
        }
 public static CustomList<AccReportConfigurationHead> GetAllAccReportConfigurationHead(Int32 ReportTypeID)
 {
     ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
     CustomList<AccReportConfigurationHead> AccReportConfigurationHeadCollection = new CustomList<AccReportConfigurationHead>();
     IDataReader reader = null;
     String sql = "Exec spGetHeadCategoryMap "+ReportTypeID;
     try
     {
         conManager.OpenDataReader(sql, out reader);
         while (reader.Read())
         {
             AccReportConfigurationHead newAccReportConfigurationHead = new AccReportConfigurationHead();
             newAccReportConfigurationHead.SetData(reader);
             AccReportConfigurationHeadCollection.Add(newAccReportConfigurationHead);
         }
         return AccReportConfigurationHeadCollection;
     }
     catch(Exception ex)
     {
         throw (ex);
     }
     finally
     {
         if (reader != null && !reader.IsClosed)
             reader.Close();
     }
 }
Пример #3
0
        private void PopulateACCInformation(AccReportConfigurationHead accReportConfigurationHead)
        {
            try
            {
                if (accReportConfigurationHead.HeadCategoryID != 0)
                    ddlHeadCategory.SelectedValue = accReportConfigurationHead.HeadCategoryID.ToString();
                txtHead.Text = accReportConfigurationHead.HeadName;
                txtSequence.Text = accReportConfigurationHead.Sequence.ToString();
                ddlOperator.SelectedValue = accReportConfigurationHead.OperationOperator;
                AccReportConfigurationHeadCOAMapList = hCM.GetAllAccReportConfigurationHeadCOAMap(accReportConfigurationHead.HeadID);
            }
            catch (Exception ex)
            {

                throw (ex);
            }
        }
Пример #4
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            try
            {
                CustomList<AccReportConfigurationHead> lstAccReportConfigurationHead = AccReportConfigurationHeadList;
                if (lstAccReportConfigurationHead.Count == 0)
                {
                    AccReportConfigurationHead newAccReportConfigurationHead = new AccReportConfigurationHead();
                    lstAccReportConfigurationHead.Add(newAccReportConfigurationHead);
                }
                SetDataFromControlToObj(ref lstAccReportConfigurationHead);
                CustomList<AccReportConfigurationHeadCOAMap> lstAccReportConfigurationHeadCOAMap = (CustomList<AccReportConfigurationHeadCOAMap>)AccReportConfigurationHeadCOAMapList;

                if (!CheckUserAuthentication(lstAccReportConfigurationHead, lstAccReportConfigurationHeadCOAMap)) return;
                hCM.SaveAccReportConfigurationHead(ref lstAccReportConfigurationHead, ref lstAccReportConfigurationHeadCOAMap);
                ((PageBase)this.Page).SuccessMessage = (StaticInfo.SavedSuccessfullyMsg);
            }
            catch (SqlException ex)
            {
                ((PageBase)this.Page).ErrorMessage = (ExceptionHelper.getSqlExceptionMessage(ex));
            }
            catch (Exception ex)
            {
                ((PageBase)this.Page).ErrorMessage = (ExceptionHelper.getExceptionMessage(ex));
            }
        }