Exemplo n.º 1
0
        /// <summary>
        /// 批量获取代码名称对应的枚举项
        /// </summary>
        /// <param name="codeNames"></param>
        /// <returns></returns>
        public List <CodeItemInfo> GetListByCodeNames(List <string> codeNames)
        {
            if (codeNames.Count == 0)
            {
                throw new Exception("MC:0x00000084");///数据错误
            }
            List <CodeInfo> codeInfos = new CodeDAL().GetList("[CODE_NAME] in ('" + string.Join("','", codeNames.ToArray()) + "')", string.Empty);

            if (codeInfos.Count == 0)
            {
                throw new Exception("MC:0x00000084");///数据错误
            }
            List <CodeItemInfo> codeItemInfos = dal.GetList("[CODE_FID] in ('" + string.Join("','", codeInfos.Select(d => d.Fid.GetValueOrDefault()).ToArray()) + "')", string.Empty);

            foreach (var codeItemInfo in codeItemInfos)
            {
                CodeInfo codeInfo = codeInfos.FirstOrDefault(d => d.Fid.GetValueOrDefault() == codeItemInfo.CodeFid.GetValueOrDefault());
                if (codeInfo == null)
                {
                    continue;
                }
                codeItemInfo.CodeName = codeInfo.CodeName;
            }
            return(codeItemInfos);
        }
Exemplo n.º 2
0
 /// <summary>
 /// This method is used to code type list
 /// </summary>
 /// <returns></returns>
 public List <string> CodeTypeList()
 {
     try
     {
         CodeDAL objCodeDAL = new CodeDAL();
         return(objCodeDAL.CodeTypeList());
     }
     catch (Exception)
     {
         throw;
     }
     finally
     {
         CommonDAL.logger.LogInfo(typeof(string), string.Format(CultureInfo.InvariantCulture, "End {2} function ::{0} {1}.", DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(), MethodBase.GetCurrentMethod().Name));
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// This method is used to update code details
 /// </summary>
 /// <param name="objCodeProp"></param>
 /// <returns></returns>
 /// <createdOn>May-24-2016</createdon>
 public bool UpdateCodeAdminDetails(CodeProp objCodeProp)
 {
     try
     {
         CommonDAL.logger.LogInfo(typeof(string), string.Format(CultureInfo.InvariantCulture, "Called {2} function ::{0} {1}.", DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(), MethodBase.GetCurrentMethod().Name));
         CodeDAL objCodeDAL = new CodeDAL();
         return(objCodeDAL.UpdateCodeAdminDetails(objCodeProp));
     }
     catch (Exception)
     {
         throw;
     }
     finally
     {
         CommonDAL.logger.LogInfo(typeof(string), string.Format(CultureInfo.InvariantCulture, "End {2} function ::{0} {1}.", DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(), MethodBase.GetCurrentMethod().Name));
     }
 }
Exemplo n.º 4
0
 /// <summary>
 /// This method is used to get the code list.
 /// </summary>
 /// <param name="codeType"></param>
 /// <param name="codeDesc"></param>
 /// <returns></returns>
 /// <createdOn>Jun-06-2016</createdon>
 public IList <CodeProp> GetCodeDetailsForInvoice(string codeType, string codeDesc)
 {
     try
     {
         CommonDAL.logger.LogInfo(typeof(string), string.Format(CultureInfo.InvariantCulture, "Called {2} function ::{0} {1}.", DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(), MethodBase.GetCurrentMethod().Name));
         CodeDAL objCodeDal = new CodeDAL();
         return(objCodeDal.GetCodeDetailsForInvoice(codeType, codeDesc));
     }
     catch (Exception)
     {
         throw;
     }
     finally
     {
         CommonDAL.logger.LogInfo(typeof(string), string.Format(CultureInfo.InvariantCulture, "End {2} function ::{0} {1}.", DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(), MethodBase.GetCurrentMethod().Name));
     }
 }
Exemplo n.º 5
0
        /// <summary>
        /// This method is used to check duplicate code and codetype values.
        /// </summary>
        /// <param name="objCodeProp"></param>
        /// <returns></returns>
        /// <createdOn>May-24-2016</createdon>
        public bool CheckDuplicateCodeAndType(string code, string codeType)
        {
            CodeDAL objCodeDAL = new CodeDAL();

            try
            {
                CommonDAL.logger.LogInfo(typeof(string), string.Format(CultureInfo.InvariantCulture, "Called {2} function ::{0} {1}.", DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(), MethodBase.GetCurrentMethod().Name));
                return(objCodeDAL.CheckDuplicateCodeAndType(code, codeType));
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                CommonDAL.logger.LogInfo(typeof(string), string.Format(CultureInfo.InvariantCulture, "End {2} function ::{0} {1}.", DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(), MethodBase.GetCurrentMethod().Name));
            }
        }
Exemplo n.º 6
0
        /// <summary>
        /// To Find Billing Period Record
        /// </summary>
        /// <param name="objBillingPeriod"></param>
        /// <returns>IList<BillingPeriod></returns>
        /// <createdBy></createdBy>
        /// <createdOn>May-20,2016</createdOn>
        public IList <CodeProp> FindCode(CodeProp objCodeProp)
        {
            IList <CodeProp> listCodeProp;
            CodeDAL          objCodeDAL = new CodeDAL(); /// Creating The Object of BillingDAL

            CommonDAL.logger.LogInfo(typeof(string), string.Format(CultureInfo.InvariantCulture, "Called {2} function ::{0} {1}.", DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(), MethodBase.GetCurrentMethod().Name));
            try
            {
                listCodeProp = objCodeDAL.FindCode(objCodeProp); /// sending the new record model to the data access layer.
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                objCodeDAL = null;
                CommonDAL.logger.LogInfo(typeof(string), string.Format(CultureInfo.InvariantCulture, "End {2} function ::{0} {1}.", DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(), MethodBase.GetCurrentMethod().Name));
            }
            return(listCodeProp);
        }
Exemplo n.º 7
0
 public static string CodeUrlSel(string sAbbre)
 {
     return(CodeDAL.CodeUrlSel(sAbbre));
 }
Exemplo n.º 8
0
 public static List <Code> CodeTypeSel(string sGameAbbre)
 {
     return(CodeDAL.CodeTypeSel(sGameAbbre));
 }