Beispiel #1
0
        /// <summary>
        /// 创建POST连接
        /// </summary>
        /// <param name="dataDic"></param>
        /// <returns></returns>
        public static string postDataToFp(Dictionary <string, string> dataDic)
        {
            FpUtility.Fp_DAL.CallApi call = new Fp_DAL.CallApi(dataDic);
            string res = call.PostData();

            return(res);
        }
Beispiel #2
0
 public static string ImportSampleSourceDataToFp(Fp_Common.UnameAndPwd up, string sampleSourceTypeName, Dictionary<string, string> jsonDic)
 {
     string result = string.Empty;
     Dictionary<string, string> dic = new Dictionary<string, string>();
     dic.Add("username", up.UserName);
     dic.Add("password", up.PassWord);
     dic.Add("method", Fp_Common.FpMethod.import_sources.ToString());
     dic.Add("sample_source_type", sampleSourceTypeName);
     if (jsonDic != null && jsonDic.Count > 0)
     {
         dic.Add("json", Fp_Common.FpJsonHelper.DictionaryToJsonString(jsonDic));
     }
     Fp_DAL.CallApi call = new Fp_DAL.CallApi(dic);
     result = call.PostData();
     return result;
 }
Beispiel #3
0
        public static string ImportSampleSourceDataToFp(Fp_Common.UnameAndPwd up, string sampleSourceTypeName, Dictionary <string, string> jsonDic)
        {
            string result = string.Empty;
            Dictionary <string, string> dic = new Dictionary <string, string>();

            dic.Add("username", up.UserName);
            dic.Add("password", up.PassWord);
            dic.Add("method", Fp_Common.FpMethod.import_sources.ToString());
            dic.Add("sample_source_type", sampleSourceTypeName);
            if (jsonDic != null && jsonDic.Count > 0)
            {
                dic.Add("json", Fp_Common.FpJsonHelper.DictionaryToJsonString(jsonDic));
            }
            Fp_DAL.CallApi call = new Fp_DAL.CallApi(dic);
            result = call.PostData();
            return(result);
        }
Beispiel #4
0
        /// <summary>
        /// 提交样本数据到系统
        /// </summary>
        /// <param name="up"></param>
        /// <param name="jsonDic"></param>
        /// <returns></returns>
        private static string ImportSampleToFp(Fp_Common.UnameAndPwd up, Dictionary <string, string> jsonDic)
        {
            string result = string.Empty;
            Dictionary <string, string> dic = new Dictionary <string, string>();

            dic.Add("username", up.UserName);
            dic.Add("password", up.PassWord);
            dic.Add("method", FpMethod.import_samples.ToString());
            if (jsonDic != null && jsonDic.Count > 0)
            {
                foreach (KeyValuePair <string, string> item in jsonDic)
                {
                    dic.Add(item.Key.Trim(), item.Value.Trim());
                }
            }
            Fp_DAL.CallApi call = new Fp_DAL.CallApi(dic);
            result = call.PostData();
            return(result);
        }
Beispiel #5
0
 public static string postDataToFp(Dictionary<string,string> dataDic)
 {
     FpUtility.Fp_DAL.CallApi call = new Fp_DAL.CallApi(dataDic);
     string res = call.PostData();
     return res;
 }
Beispiel #6
0
 private static string ImportSampleToFp(Fp_Common.UnameAndPwd up, Dictionary<string, string> jsonDic)
 {
     string result = string.Empty;
     Dictionary<string, string> dic = new Dictionary<string, string>();
     dic.Add("username", up.UserName);
     dic.Add("password", up.PassWord);
     dic.Add("method", FpMethod.import_samples.ToString());
     //dic.Add("method", FpMethod.import_samples_bulk.ToString());
     if (jsonDic != null && jsonDic.Count > 0)
     {
         foreach (KeyValuePair<string, string> item in jsonDic)
         {
             dic.Add(item.Key.Trim(), item.Value.Trim());
         }
     }
     Fp_DAL.CallApi call = new Fp_DAL.CallApi(dic);
     result = call.PostData();
     return result;
 }