Exemple #1
0
 private string GetStoreprocName(MyLookup.Dropdowns dropdownName)
 {
     string spName = string.Empty;
     switch (dropdownName)
     {
         case MyLookup.Dropdowns.EnzymeDetails :
             spName = "USP_GET_Enzyme_Data";
             break;
         case MyLookup.Dropdowns.FiscalYear :
             spName = "USP_GET_FiscalYear";
             break;
         case MyLookup.Dropdowns.Region :
             spName = "USp_GET_Region";
             break;
         default :
             spName = "";
             break;
     }
     return spName;
 }
Exemple #2
0
 //public bool getFiscalYr_BAL(ref DataSet objDS)
 //{
 //    bool bReturn = false;
 //    string m_strLastError;
 //    try
 //    {
 //        objAdminGBUSelectionDO = new clsDemographicDAL();
 //        //Call the data access function here
 //        if (objAdminGBUSelectionDO.getFiscalYrDAL(ref objDS))
 //            bReturn = true;
 //        else
 //        {
 //            //Get the last error from DA class here.
 //            //m_strLastError = objAdminGBUSelectionDO.GetLastError();
 //        }
 //    }
 //    catch (Exception ex)
 //    {
 //        //Set the error to this variable
 //        m_strLastError = ex.StackTrace;
 //    }
 //    //Return the status here
 //    return bReturn;
 //}
 public DataTable GetDropDownValuesBAL(MyLookup.Dropdowns drpName,ref bool flagStatus)
 {
     objAdminGBUSelectionDO = new clsDemographicDAL();
     return objAdminGBUSelectionDO.GetDropDownValuesDAL(drpName, ref flagStatus);
 }
Exemple #3
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="objDS"></param>
        /// <returns></returns>
        public DataTable GetDropDownValuesDAL(MyLookup.Dropdowns drpName,ref bool flagStatus)
        {
            DataTable dt = new DataTable();
            try
            {
                DataSet objDS = new DataSet();
                if (objDBPool.SpQueryDataset(GetStoreprocName(drpName), ref objDS))
                {
                    if (objDS != null)
                    {
                        if (objDS.Tables.Count > 0)
                        {
                            dt = objDS.Tables[0];
                            flagStatus = true;
                        }
                    }
                }

            }
            catch (Exception ex)
            {
                ErrorLog.SaveErrorLog("", "DALC Error", ex.ToString(), GetStoreprocName(drpName), "", "",                       ErrorLog.LogMessageType.LogError);
            }
            finally
            {
                objDBPool = null;
            }
            return dt;
        }