コード例 #1
0
ファイル: frmMain.cs プロジェクト: huhai880617/check
 /// <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);
 }
コード例 #2
0
ファイル: frmLogincs.cs プロジェクト: huhai880617/check
        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";
                }
            }
        }