Beispiel #1
0
 /// <summary>
 /// 查询获取订单信息
 /// </summary>
 /// <param name="receiptCode">订单号</param>
 /// <param name="PrefCode">入库首选项</param>
 private void getOrderInfo(string receiptCode, string PrefCode)
 {
     string name = @"/receipt";
     string url  = string.Format("{0}{1}{2}?receiptCode={3}&prefCode={4}", loginUser.server, controlReceiptApi, name, receiptCode, PrefCode);
     string Rstr = TTX_WebAPI_Helper.getReturnJson(url);
     ResponseReceiptEntity rsp = JsonToolEx.ToObject <ResponseReceiptEntity>(Rstr);
 }
Beispiel #2
0
        private void frmLogincs_Load(object sender, EventArgs e)
        {
            string file = Path.Combine(Application.StartupPath, "config\\config.ini");

            cfg          = new ConfigSetting(file);
            txtUser.Text = cfg.User;
            string url = cfg.Server + controllApi;
            string str = TTX_WebAPI_Helper.getReturnJson(url);
            ResponseWarehouseEntity rsp = JsonToolEx.ToObject <ResponseWarehouseEntity>(str.Replace("default", "flag"));

            if (rsp != null && rsp.data != null)
            {
                rsm = rsp;
                if (rsm.data != null && rsm.data.Count > 0)
                {
                    cbxWarehouse.DataSource    = null;
                    cbxWarehouse.DataSource    = rsm.data;
                    cbxWarehouse.DisplayMember = "name";
                    cbxWarehouse.ValueMember   = "code";
                }
            }
        }