示例#1
0
 public bool AddInfoToCusrKmTempTbl(KHBMModal khbmModal)
 {
     try
     {
         if (khbmModal != null)
         {
             Dictionary <string, object> dictionary = new Dictionary <string, object>();
             dictionary.Add("strKHBH", khbmModal.BM);
             dictionary.Add("strYSKM", khbmModal.YSKM);
             dictionary.Add("strSJBM", khbmModal.SJBM);
             string str = "aisino.fwkp.Fpzpz.InsertTempTable_KHKMB";
             int    num = this.baseDao.updateSQL(str, dictionary);
             if (0 < num)
             {
                 return(true);
             }
         }
         return(false);
     }
     catch (BaseException exception)
     {
         this.loger.Error(exception.Message);
         ExceptionHandler.HandleError(exception);
     }
     catch (Exception exception2)
     {
         this.loger.Error(exception2.Message);
         ExceptionHandler.HandleError(exception2);
     }
     return(false);
 }
示例#2
0
        public static bool AddAreaIDToCusrTBL()
        {
            IBaseDAO baseDAOSQLite = BaseDAOFactory.GetBaseDAOSQLite();

            baseDAOSQLite.Open();
            try
            {
                IKHBM            ikhbm   = new KHBM();
                IXZQYBM          ixzqybm = new XZQYBM();
                List <KHBMModal> list    = ikhbm.SelectKHBM_WJ(1);
                if (list == null)
                {
                    return(false);
                }
                if (0 < list.Count)
                {
                    for (int i = 0; i < list.Count; i++)
                    {
                        KHBMModal modal = list[i];
                        string    sH    = modal.SH;
                        if (sH.Length >= 4)
                        {
                            if (!string.IsNullOrEmpty(sH) && (4 <= sH.Length))
                            {
                                ikhbm.UpdateKHBM_DQBM(modal.BM, sH.Substring(0, 4));
                            }
                            string             strBM = sH.Substring(0, 4);
                            List <XZQYBMModal> list2 = ixzqybm.SelectXZQYBM_BM(strBM);
                            if ((list2 != null) && (0 < list2.Count))
                            {
                                ikhbm.UpdateKHBM_DQMC(modal.BM, list2[0].MC.Trim());
                            }
                        }
                    }
                    PropertyUtil.SetValue(DingYiZhiFuChuan.A6KHMsgWrite, "已经添加地区代码到客户编码表");
                }
                else
                {
                    return(false);
                }
            }
            catch (BaseException exception)
            {
                writeLogfile("Errinfo:" + exception.Message, _Loger);
                _Loger.Error(exception.ToString());
                ExceptionHandler.HandleError(exception);
            }
            catch (Exception exception2)
            {
                writeLogfile("Errinfo:" + exception2.Message, _Loger);
                _Loger.Error(exception2.ToString());
                ExceptionHandler.HandleError(exception2);
            }
            finally
            {
                baseDAOSQLite.Commit();
                baseDAOSQLite.Close();
            }
            return(true);
        }
示例#3
0
 public static List <KHBMModal> ArrayListToListKHBMModal(ArrayList arrayList, ILog loger)
 {
     try
     {
         if (arrayList == null)
         {
             return(null);
         }
         if (0 >= arrayList.Count)
         {
             return(null);
         }
         List <KHBMModal> list = new List <KHBMModal>();
         foreach (object obj2 in arrayList)
         {
             Dictionary <string, object> dictionary = obj2 as Dictionary <string, object>;
             KHBMModal item = new KHBMModal {
                 BM   = dictionary[DingYiZhiFuChuan.KHBMCulmnDataName[0]].ToString(),
                 MC   = dictionary[DingYiZhiFuChuan.KHBMCulmnDataName[1]].ToString(),
                 JM   = dictionary[DingYiZhiFuChuan.KHBMCulmnDataName[2]].ToString(),
                 SJBM = dictionary[DingYiZhiFuChuan.KHBMCulmnDataName[3]].ToString(),
                 KJM  = dictionary[DingYiZhiFuChuan.KHBMCulmnDataName[4]].ToString(),
                 SH   = dictionary[DingYiZhiFuChuan.KHBMCulmnDataName[5]].ToString(),
                 DZDH = dictionary[DingYiZhiFuChuan.KHBMCulmnDataName[6]].ToString(),
                 YHZH = dictionary[DingYiZhiFuChuan.KHBMCulmnDataName[8]].ToString(),
                 YJDZ = dictionary[DingYiZhiFuChuan.KHBMCulmnDataName[9]].ToString(),
                 BZ   = dictionary[DingYiZhiFuChuan.KHBMCulmnDataName[10]].ToString(),
                 YSKM = dictionary[DingYiZhiFuChuan.KHBMCulmnDataName[11]].ToString(),
                 DQBM = dictionary[DingYiZhiFuChuan.KHBMCulmnDataName[12]].ToString(),
                 DQMC = dictionary[DingYiZhiFuChuan.KHBMCulmnDataName[13]].ToString(),
                 DQKM = dictionary[DingYiZhiFuChuan.KHBMCulmnDataName[14]].ToString()
             };
             string s      = dictionary[DingYiZhiFuChuan.KHBMCulmnDataName[0x10]].ToString();
             int    result = 0;
             int.TryParse(s, out result);
             item.WJ = result;
             list.Add(item);
         }
         return(list);
     }
     catch (BaseException exception)
     {
         loger.Error(exception.Message);
         ExceptionHandler.HandleError(exception);
     }
     catch (Exception exception2)
     {
         loger.Error(exception2.Message);
         ExceptionHandler.HandleError(exception2);
     }
     return(null);
 }
示例#4
0
 public static List <KHBMModal> ArrayListToListKHKMBModal(ArrayList arrayList, ILog loger)
 {
     try
     {
         if (arrayList == null)
         {
             return(null);
         }
         if (0 >= arrayList.Count)
         {
             return(null);
         }
         List <KHBMModal> list = new List <KHBMModal>();
         foreach (object obj2 in arrayList)
         {
             Dictionary <string, object> dictionary = obj2 as Dictionary <string, object>;
             KHBMModal item = new KHBMModal {
                 BM   = dictionary["KHBH"].ToString(),
                 SJBM = dictionary[DingYiZhiFuChuan.KHBMCulmnDataName[3]].ToString(),
                 YSKM = dictionary[DingYiZhiFuChuan.KHBMCulmnDataName[11]].ToString()
             };
             list.Add(item);
         }
         return(list);
     }
     catch (BaseException exception)
     {
         loger.Error(exception.Message);
         ExceptionHandler.HandleError(exception);
     }
     catch (Exception exception2)
     {
         loger.Error(exception2.Message);
         ExceptionHandler.HandleError(exception2);
     }
     return(null);
 }
示例#5
0
 public bool AddInfoToCusrKmTempTbl(KHBMModal khbmModal)
 {
     return(this.dal.AddInfoToCusrKmTempTbl(khbmModal));
 }