Esempio n. 1
0
        /// <summary>
        /// Description  : To Get Work Order INCorpDetails.
        /// Created By   : Sudheer  
        /// Created Date : 30 July 2014
        /// Modified By  :
        /// Modified Date:
        /// </summary>
        /// <returns></returns>
        public static AllotmentDetails GetWOAllotmentDetails(string WOID)
        {
            var WOAllotData = new AllotmentDetails();

            System.Diagnostics.StackFrame stackFrame = new System.Diagnostics.StackFrame();
            System.Reflection.MethodBase methodBase = stackFrame.GetMethod();
            log.Debug("Start: " + methodBase.Name);
            try
            {
                SqlParameter[] sqlParams = new SqlParameter[1];
                sqlParams[0] = new SqlParameter("@WOID", WOID);
                var reader = SqlHelper.ExecuteReader(ConnectionUtility.GetConnectionString(), CommandType.StoredProcedure, "[SpGetWOAllotmentDetails]", sqlParams);
                var safe = new SafeDataReader(reader);
                while (reader.Read())
                {
                    WOAllotData.FetchWOAllot(WOAllotData, safe);
                }

                return WOAllotData;
            }
            catch (Exception ex)
            {
                log.Error("Error: " + ex);
                return WOAllotData;
            }
            finally
            {
                log.Debug("End: " + methodBase.Name);
            }
        }