Esempio n. 1
0
 //{"Total":1,"Freezers":[{"id":1,"name":"001号冰箱","description":"001号冰箱","access":0,"subdivisions":4,"boxes":0,"barcode_tag":"7000000001","rfid_tag":"355AB1CBC000007000000001"}]}
 //获取冰箱结构
 public static List<Fp_Model.Freezer> GetAll(Fp_Common.UnameAndPwd up)
 {
     Dictionary<string, string> dic = new Dictionary<string, string>();
     dic.Add("username", up.UserName);
     dic.Add("password", up.PassWord);
     dic.Add("method", Fp_Common.FpMethod.freezers.ToString());
     FreezerProUtility.Fp_DAL.CallApi call = new FreezerProUtility.Fp_DAL.CallApi(dic);
     List<Freezer> list = call.getdata<Freezer>("Freezers");
     return list;
 }
Esempio n. 2
0
 public static List<Fp_Model.Subdivision> GetAll(Fp_Common.UnameAndPwd up, string id)
 {
     Dictionary<string, string> dic = new Dictionary<string, string>();
     dic.Add("username", up.UserName);
     dic.Add("password", up.PassWord);
     dic.Add("method", Fp_Common.FpMethod.subdivisions.ToString());
     dic.Add("id", id);
     FreezerProUtility.Fp_DAL.CallApi call = new FreezerProUtility.Fp_DAL.CallApi(dic);
     List<Fp_Model.Subdivision> List = call.getdata<Fp_Model.Subdivision>("Subdivision");
     return List;
 }
Esempio n. 3
0
        public static List <Fp_Model.Sample_Group> GetAll(Fp_Common.UnameAndPwd up)
        {
            Dictionary <string, string> dic = new Dictionary <string, string>();

            dic.Add("username", up.UserName);
            dic.Add("password", up.PassWord);
            dic.Add("method", Fp_Common.FpMethod.sample_groups.ToString());
            FreezerProUtility.Fp_DAL.CallApi call = new FreezerProUtility.Fp_DAL.CallApi(dic);
            List <Fp_Model.Sample_Group>     List = call.getdata <Fp_Model.Sample_Group>("SampleGroups");

            return(List);
        }
Esempio n. 4
0
File: Boxes.cs Progetto: aj-hc/SY
 public static List<Box> GetAll(Fp_Common.UnameAndPwd up, string id)
 {
     Dictionary<string, string> dic = new Dictionary<string, string>();
     dic.Add("username", up.UserName);
     dic.Add("password", up.PassWord);
     dic.Add("method", Fp_Common.FpMethod.boxes.ToString());
     dic.Add("id", id);
     dic.Add("show_empty", "true");
     FreezerProUtility.Fp_DAL.CallApi call = new FreezerProUtility.Fp_DAL.CallApi(dic);
     List<Box> boxes = call.getdata<Box>("Boxes");
     return boxes;
 }
Esempio n. 5
0
        public static List <Fp_Model.Subdivision> GetAll(Fp_Common.UnameAndPwd up, string id)
        {
            Dictionary <string, string> dic = new Dictionary <string, string>();

            dic.Add("username", up.UserName);
            dic.Add("password", up.PassWord);
            dic.Add("method", Fp_Common.FpMethod.subdivisions.ToString());
            dic.Add("id", id);
            FreezerProUtility.Fp_DAL.CallApi call = new FreezerProUtility.Fp_DAL.CallApi(dic);
            List <Fp_Model.Subdivision>      List = call.getdata <Fp_Model.Subdivision>("Subdivision");

            return(List);
        }
Esempio n. 6
0
        public static List <Box> GetAll(Fp_Common.UnameAndPwd up, string id)
        {
            Dictionary <string, string> dic = new Dictionary <string, string>();

            dic.Add("username", up.UserName);
            dic.Add("password", up.PassWord);
            dic.Add("method", Fp_Common.FpMethod.boxes.ToString());
            dic.Add("id", id);
            dic.Add("show_empty", "true");
            FreezerProUtility.Fp_DAL.CallApi call = new FreezerProUtility.Fp_DAL.CallApi(dic);
            List <Box> boxes = call.getdata <Box>("Boxes");

            return(boxes);
        }
Esempio n. 7
0
 /// 查询指定冰箱指定位置是否存在符合条件的盒子
 public static string get_perfect_box(Fp_Common.UnameAndPwd up, string space, string freezer_name)
 {
     string resultStr = 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.get_perfect_box.ToString());
     dic.Add("freezer_name", freezer_name);
     dic.Add("space", space);
     FreezerProUtility.Fp_DAL.CallApi call = new FreezerProUtility.Fp_DAL.CallApi(dic);
     resultStr = call.GetData();
     return resultStr;
     //暂时如此,直接返回查询之后的结果,能不能查到得到都返回,后期需要将返回结果解析之后返回
     //http://192.168.183.130/api?username=admin&password=123456&method=get_perfect_box&freezer_name=tem->admin->06&space=8
     //{"success":true,"box_id":1351,"location":"tem->admin->06->02->1"}
 }
Esempio n. 8
0
        /// 查询指定冰箱指定位置是否存在符合条件的盒子
        public static string get_perfect_box(Fp_Common.UnameAndPwd up, string space, string freezer_name)
        {
            string resultStr = 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.get_perfect_box.ToString());
            dic.Add("freezer_name", freezer_name);
            dic.Add("space", space);
            FreezerProUtility.Fp_DAL.CallApi call = new FreezerProUtility.Fp_DAL.CallApi(dic);
            resultStr = call.GetData();
            return(resultStr);
            //暂时如此,直接返回查询之后的结果,能不能查到得到都返回,后期需要将返回结果解析之后返回
            //http://192.168.183.130/api?username=admin&password=123456&method=get_perfect_box&freezer_name=tem->admin->06&space=8
            //{"success":true,"box_id":1351,"location":"tem->admin->06->02->1"}
        }
Esempio n. 9
0
File: TestData.cs Progetto: aj-hc/SY
 private static string ImportTestDataToFp(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", Fp_Common.FpMethod.import_tests.ToString());
     if (jsonDic != null && jsonDic.Count > 0)
     {
         foreach (KeyValuePair<string, string> item in jsonDic)
         {
             dic.Add(item.Key, item.Value);
         }
     }
     FreezerProUtility.Fp_DAL.CallApi call = new FreezerProUtility.Fp_DAL.CallApi(dic);
     result = call.PostData();
     return result;
 }
Esempio n. 10
0
        private static string ImportTestDataToFp(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", Fp_Common.FpMethod.import_tests.ToString());
            if (jsonDic != null && jsonDic.Count > 0)
            {
                foreach (KeyValuePair <string, string> item in jsonDic)
                {
                    dic.Add(item.Key, item.Value);
                }
            }
            FreezerProUtility.Fp_DAL.CallApi call = new FreezerProUtility.Fp_DAL.CallApi(dic);
            result = call.PostData();
            return(result);
        }