Ejemplo n.º 1
0
 public static Dictionary <string, object> GetFPLBBM()
 {
     try
     {
         IBaseDAO baseDAOSQLite = BaseDAOFactory.GetBaseDAOSQLite();
         Dictionary <string, object> dictionary = new Dictionary <string, object>();
         dictionary.Clear();
         foreach (Dictionary <string, object> dictionary2 in baseDAOSQLite.querySQL("aisino.Fwkp.Fplygl.FPLBBM.AllData", dictionary))
         {
             string key  = dictionary2["BM"].ToString().Trim();
             string str2 = dictionary2["MC"].ToString().Trim();
             if (!dictionary.ContainsKey(key))
             {
                 dictionary.Add(key, str2);
             }
         }
         return(dictionary);
     }
     catch (BaseException exception)
     {
         loger.Error(exception.Message);
         ExceptionHandler.HandleError(exception);
         return(null);
     }
     catch (Exception exception2)
     {
         loger.Error(exception2.Message);
         ExceptionHandler.HandleError(exception2);
         return(null);
     }
 }
Ejemplo n.º 2
0
        public bool yhzc_contain_slv(string yhzc, string slv, bool ishysy)
        {
            string   str           = "aisino.Fwkp.Bmgl.BMSPFL.SelectYhzcs";
            IBaseDAO baseDAOSQLite = BaseDAOFactory.GetBaseDAOSQLite();
            Dictionary <string, object> dictionary = new Dictionary <string, object>();
            ArrayList list = baseDAOSQLite.querySQL(str, dictionary);

            if (ishysy)
            {
                foreach (Dictionary <string, object> dictionary2 in list)
                {
                    if ((dictionary2["YHZCMC"].ToString() == yhzc) && (dictionary2["SLV"].ToString() == ""))
                    {
                        return(true);
                    }
                }
                return(false);
            }
            slv = ((double.Parse(slv) * 100.0)).ToString() + "%";
            foreach (Dictionary <string, object> dictionary3 in list)
            {
                if ((dictionary3["YHZCMC"].ToString() == yhzc) && (dictionary3["SLV"].ToString() == ""))
                {
                    return(true);
                }
                if ((dictionary3["YHZCMC"].ToString() == yhzc) && dictionary3["SLV"].ToString().Contains(slv))
                {
                    return(true);
                }
            }
            return(false);
        }
Ejemplo n.º 3
0
        public bool yhzc_contain_slv(string yhzc, string slv, bool flag, bool isTsfp)
        {
            string   str           = "aisino.fwkp.Wbjk.SelectYhzcs";
            IBaseDAO baseDAOSQLite = BaseDAOFactory.GetBaseDAOSQLite();
            Dictionary <string, object> dictionary = new Dictionary <string, object>();
            ArrayList list = baseDAOSQLite.querySQL(str, dictionary);

            if (isTsfp)
            {
                foreach (Dictionary <string, object> dictionary2 in list)
                {
                    if ((dictionary2["YHZCMC"].ToString() == yhzc) && (dictionary2["SLV"].ToString() == ""))
                    {
                        return(true);
                    }
                }
                return(false);
            }
            if ((slv == "免税") || (slv == "不征税"))
            {
                slv = "0%";
            }
            else if (!flag)
            {
                slv = ((double.Parse(slv) * 100.0)).ToString() + "%";
            }
            foreach (Dictionary <string, object> dictionary2 in list)
            {
                string[] source = dictionary2["SLV"].ToString().Split(new string[] { "、", ",", "," }, StringSplitOptions.RemoveEmptyEntries);
                for (int i = 0; i < source.Length; i++)
                {
                    if (source[i] == "1.5%_5%")
                    {
                        source[i] = "1.5%";
                    }
                }
                if ((dictionary2["YHZCMC"].ToString() == yhzc) && (dictionary2["SLV"].ToString() == ""))
                {
                    return(true);
                }
                if ((dictionary2["YHZCMC"].ToString() == yhzc) && source.Contains <string>(slv))
                {
                    return(true);
                }
            }
            return(false);
        }
Ejemplo n.º 4
0
        public void Update_SP()
        {
            List <string> sqlID = new List <string>();
            List <Dictionary <string, object> > param = new List <Dictionary <string, object> >();
            DataTable table = this.QuerySPNotYHZCMC();

            if (table != null)
            {
                BMSPFLManager manager = new BMSPFLManager();
                for (int i = 0; i < table.Rows.Count; i++)
                {
                    string str        = table.Rows[i]["BM"].ToString();
                    string str2       = table.Rows[i]["MC"].ToString();
                    string slv        = table.Rows[i]["SLV"].ToString();
                    bool   flag       = bool.Parse(table.Rows[i]["HYSY"].ToString());
                    string bm         = table.Rows[i]["SPFL"].ToString();
                    string str5       = table.Rows[i]["YHZC"].ToString();
                    string str6       = table.Rows[i]["YHZCMC"].ToString();
                    string str7       = table.Rows[i]["LSLVBS"].ToString();
                    string sPFLMCBYBM = manager.GetSPFLMCBYBM(bm);
                    Dictionary <string, object> item = new Dictionary <string, object>();
                    IBaseDAO baseDAOSQLite           = BaseDAOFactory.GetBaseDAOSQLite();
                    item.Add("BM", bm);
                    ArrayList list3 = baseDAOSQLite.querySQL("aisino.Fwkp.Bmgl.BMSPFL.SelectYHZCS", item);
                    str5 = "否";
                    bool ishysy = flag;
                    foreach (Dictionary <string, object> dictionary2 in list3)
                    {
                        string[] strArray = dictionary2["ZZSTSGL"].ToString().Split(new string[] { "、", ",", "," }, StringSplitOptions.RemoveEmptyEntries);
                        for (int j = 0; j < strArray.Length; j++)
                        {
                            if (this.yhzc_contain_slv(strArray[j], slv, ishysy))
                            {
                                str5 = "是";
                                str6 = strArray[j];
                                if ((str6 == "出口零税") && (slv == "0"))
                                {
                                    str7 = "0";
                                }
                                else if ((str6 == "免税") && (slv == "0"))
                                {
                                    str7 = "1";
                                }
                                else if ((str6 == "不征税") && (slv == "0"))
                                {
                                    str7 = "2";
                                }
                                break;
                            }
                        }
                    }
                    item.Clear();
                    item.Add("SPFLMC", sPFLMCBYBM);
                    item.Add("YHZC", str5);
                    item.Add("YHZCMC", str6);
                    item.Add("BM", str);
                    item.Add("MC", str2);
                    item.Add("LSLVBS", str7);
                    sqlID.Add("aisino.Fwkp.Bmgl.BMSP.UpdataBM_SP");
                    param.Add(item);
                }
                new BMSPFLManager().UpdateSPFLTable(sqlID, param, false);
            }
        }