示例#1
0
 public bool AddInfoToPZTempTbl(TPZEntry_InfoModal pz_InfoModal)
 {
     try
     {
         if (pz_InfoModal != null)
         {
             Dictionary <string, object> dictionary = new Dictionary <string, object>();
             dictionary.Add("iZH", pz_InfoModal.PZEntry_Group);
             dictionary.Add("strDJXX", pz_InfoModal.PZEntry_KindcodeNo);
             dictionary.Add("strKHBH", pz_InfoModal.PZEntry_CusrID);
             string str = Convert.ToString(pz_InfoModal.PZEntry_JE);
             if ((str.Length - str.IndexOf(".")) > 7)
             {
                 object[] objArray  = new object[] { str, str.IndexOf(".") + 3 };
                 object[] objArray2 = ServiceFactory.InvokePubService("Aisino.Fwkp.Fpkj.FPPrecisionShareMethod", objArray);
                 if ((objArray2 != null) && (objArray2.Length > 0))
                 {
                     str = objArray2[0].ToString();
                 }
             }
             dictionary.Add("decJE", str);
             dictionary.Add("strKM", pz_InfoModal.PZEntry_SkKm);
             dictionary.Add("iJDBZ", pz_InfoModal.PZEntry_JDSFlag);
             dictionary.Add("strSPBH", pz_InfoModal.PZEntry_GooDsID);
             dictionary.Add("dSL", pz_InfoModal.PZEntry_SPNum);
             dictionary.Add("dDJ", pz_InfoModal.PZEntry_SPPrice);
             dictionary.Add("dateKPRQ", pz_InfoModal.PZEntry_Date);
             dictionary.Add("strJLDW", pz_InfoModal.PZEntry_Jldw);
             dictionary.Add("iHSBZ", pz_InfoModal.PZEntry_NumCheck);
             string str2 = "aisino.fwkp.Fpzpz.InsertTempTable_PZFLB";
             int    num  = this.baseDao.updateSQL(str2, 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 List <TPZEntry_InfoModal> ArrayListToListPZFLB(ArrayList arrayList, ILog loger)
 {
     try
     {
         if (arrayList == null)
         {
             return(null);
         }
         if (0 >= arrayList.Count)
         {
             return(null);
         }
         List <TPZEntry_InfoModal> list = new List <TPZEntry_InfoModal>();
         foreach (object obj2 in arrayList)
         {
             Dictionary <string, object> dictionary = obj2 as Dictionary <string, object>;
             TPZEntry_InfoModal          item       = new TPZEntry_InfoModal();
             if (dictionary.ContainsKey(DingYiZhiFuChuan.PZFLBCulmnDataName[0]))
             {
                 int.TryParse(dictionary[DingYiZhiFuChuan.PZFLBCulmnDataName[0]].ToString(), out item.PZEntry_Group);
             }
             if (dictionary.ContainsKey(DingYiZhiFuChuan.PZFLBCulmnDataName[1]))
             {
                 item.PZEntry_KindcodeNo = dictionary[DingYiZhiFuChuan.PZFLBCulmnDataName[1]].ToString();
             }
             if (dictionary.ContainsKey(DingYiZhiFuChuan.PZFLBCulmnDataName[2]))
             {
                 item.PZEntry_CusrID = dictionary[DingYiZhiFuChuan.PZFLBCulmnDataName[2]].ToString();
             }
             if (dictionary.ContainsKey(DingYiZhiFuChuan.PZFLBCulmnDataName[3]))
             {
                 decimal.TryParse(dictionary[DingYiZhiFuChuan.PZFLBCulmnDataName[3]].ToString(), out item.PZEntry_JE);
             }
             if (dictionary.ContainsKey(DingYiZhiFuChuan.PZFLBCulmnDataName[4]))
             {
                 item.PZEntry_SkKm = dictionary[DingYiZhiFuChuan.PZFLBCulmnDataName[4]].ToString();
             }
             if (dictionary.ContainsKey(DingYiZhiFuChuan.PZFLBCulmnDataName[5]))
             {
                 int.TryParse(dictionary[DingYiZhiFuChuan.PZFLBCulmnDataName[5]].ToString(), out item.PZEntry_JDSFlag);
             }
             if (dictionary.ContainsKey(DingYiZhiFuChuan.PZFLBCulmnDataName[6]))
             {
                 item.PZEntry_GooDsID = dictionary[DingYiZhiFuChuan.PZFLBCulmnDataName[6]].ToString();
             }
             if (dictionary.ContainsKey(DingYiZhiFuChuan.PZFLBCulmnDataName[7]))
             {
                 double.TryParse(dictionary[DingYiZhiFuChuan.PZFLBCulmnDataName[7]].ToString(), out item.PZEntry_SPNum);
             }
             if (dictionary.ContainsKey(DingYiZhiFuChuan.PZFLBCulmnDataName[8]))
             {
                 double.TryParse(dictionary[DingYiZhiFuChuan.PZFLBCulmnDataName[8]].ToString(), out item.PZEntry_SPPrice);
             }
             if (dictionary.ContainsKey(DingYiZhiFuChuan.PZFLBCulmnDataName[9]))
             {
                 int.TryParse(dictionary[DingYiZhiFuChuan.PZFLBCulmnDataName[9]].ToString(), out item.PZEntry_NumCheck);
             }
             if (dictionary.ContainsKey(DingYiZhiFuChuan.PZFLBCulmnDataName[10]))
             {
                 string s = dictionary[DingYiZhiFuChuan.PZFLBCulmnDataName[10]].ToString();
                 item.PZEntry_Date = DateTime.ParseExact(s, DingYiZhiFuChuan.strYear_Month_Day_Formart, CultureInfo.CurrentCulture);
             }
             if (dictionary.ContainsKey(DingYiZhiFuChuan.PZFLBCulmnDataName[11]))
             {
                 item.PZEntry_Jldw = dictionary[DingYiZhiFuChuan.PZFLBCulmnDataName[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);
 }
示例#3
0
 public bool AddInfoToPZTempTbl(TPZEntry_InfoModal pz_InfoModal)
 {
     return(this.dal.AddInfoToPZTempTbl(pz_InfoModal));
 }