public frm组柜计划(int status = -1)
        {
            InitializeComponent();

            _service = new ApiService.APIServiceClient("BasicHttpBinding_IAPIService", Global.WcfUrl);
            try
            {
                initComboBox();

                txt日期开始.Text = formatDateTime(DateTime.Now);
                txt日期结束.Text = formatDateTime(DateTime.Now);

                foreach (CodeValueClass item in cbo状态.Properties.Items)
                {
                    if (item.value == status.ToStr())
                    {
                        cbo状态.SelectedItem = item;
                    }
                }

                #region 销区列表
                var marketAreaList = _service.GetDics("101", "", true);
                treeList销区.DataSource = marketAreaList;
                #endregion
            }
            catch (Exception ex)
            {
                LogError(ex);
            }
        }
Beispiel #2
0
        public FrmPleasePurchasePlanQuery(int status = 3)
        {
            InitializeComponent();

            _service = new ApiService.APIServiceClient("BasicHttpBinding_IAPIService", Global.WcfUrl);
            try
            {
                #region 请购计划列表

                initComboBox();



                //var list = _service.GetPurchasePlanList("", "", status, "", !chkClose.Checked);
                //gridControl请购计划列表.DataSource = list;
                //lbl记录数.Text = string.Format("共查询得到记录{0}条", list.Count());
                #endregion

                #region 销区列表
                var marketAreaList = _service.GetDics("101", "", true);



                #endregion

                bgw加载数据.RunWorkerAsync();
            }
            catch (Exception ex)
            {
                LogError(ex);
            }
        }
Beispiel #3
0
        public FrmPPPImmediateSendGoods()
        {
            InitializeComponent();

            _service = new ApiService.APIServiceClient("BasicHttpBinding_IAPIService", Global.WcfUrl);
            initComboBox();
        }
Beispiel #4
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            try
            {
                this.Cursor = Cursors.WaitCursor;
                ApiService.APIServiceClient service = new ApiService.APIServiceClient("BasicHttpBinding_IAPIService", Global.WcfUrl);
                User user = service.Login(txtACC.Text, txtPAS.Text);
                if (user == null)
                {
                    MsgHelper.ShowError("用户名或密码不正确!");
                    return;
                }

                Global.LoginUser = user;

                Hide();

                if (_frmMain == null)
                {
                    _frmMain = new FrmMainB(this);
                }
                {
                    IniHelper.WriteString(Global.IniUrl, "CONFIG", "username", txtACC.Text);
                    IniHelper.WriteString(Global.IniUrl, "CONFIG", "password", txtPAS.Text);
                    _frmMain.Show();
                }

                this.Cursor = Cursors.Default;
            }
            catch (Exception ex)
            {
                LogError(ex);
                MsgHelper.ShowError("登陆异常!");
            }
        }
        public FrmPurchaseOrder(int status = 3)
        {
            InitializeComponent();
            IniValue();
            txtCreater.Text       = Global.LoginUser.UserName;
            txtCreater.Tag        = Global.LoginUser.FID;
            txtCreater.Enabled    = false;
            dateDatetime.DateTime = DateTime.Now;

            _service = new ApiService.APIServiceClient("BasicHttpBinding_IAPIService", Global.WcfUrl);

            txtBillNO.Text = _service.GetNewBillNo("PO");

            try
            {
                #region 请购计划列表

                initComboBox();

                #endregion

                #region 销区列表
                var marketAreaList = _service.GetDics("101", "", true);

                //treeList销区.DataSource = marketAreaList;

                #endregion

                bgw加载数据.RunWorkerAsync();
            }
            catch (Exception ex)
            {
                LogError(ex);
            }
        }
        public frm发货计划拆单()
        {
            InitializeComponent();

            _service = new ApiService.APIServiceClient("BasicHttpBinding_IAPIService", Global.WcfUrl);
            initComboBox();
        }
 public FrmQueryPrice(string productid, string sType = "product")
 {
     InitializeComponent();
     _service   = new ApiService.APIServiceClient("BasicHttpBinding_IAPIService", Global.WcfUrl);
     _ProductID = productid;
     SelectType = sType;
 }
        public frm请购计划编辑(string icprbillid)
        {
            InitializeComponent();

            _icprbillid = icprbillid;
            _service    = new ApiService.APIServiceClient("BasicHttpBinding_IAPIService", Global.WcfUrl);
            var list = _service.GetPurchasePlanEntryList(icprbillid, "", false);

            foreach (var model in list)
            {
                model.FCOMMITQTY = model.FORDERUNITQTY;
            }
            gridControl请购计划明细.DataSource = list;
        }
Beispiel #9
0
        public FrmOrderQuery(int status = 3)
        {
            InitializeComponent();
            txt日期开始.DateTime = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 0:0:0"));
            txt日期结束.DateTime = DateTime.Now;
            _service         = new ApiService.APIServiceClient("BasicHttpBinding_IAPIService", Global.WcfUrl);
            try
            {
                #region 请购计划列表

                initComboBox();



                /*
                 * foreach (CodeValueClass item in cbo状态.Properties.Items)
                 * {
                 *  if (item.value == status.ToStr())
                 *  {
                 *      cbo状态.SelectedItem = item;
                 *  }
                 * }
                 */


                //var list = _service.GetPurchasePlanList("", "", status, "", !chkClose.Checked);
                //gridControl请购计划列表.DataSource = list;
                //lbl记录数.Text = string.Format("共查询得到记录{0}条", list.Count());
                #endregion

                #region 销区列表
                // var marketAreaList = _service.GetDics("101", "", true);

                //treeList销区.DataSource = marketAreaList;

                #endregion

                bgw加载数据.RunWorkerAsync();
            }
            catch (Exception ex)
            {
                LogError(ex);
            }
        }
Beispiel #10
0
        public FrmPurchaseTemp(int status = 3)
        {
            InitializeComponent();

            txtCreater.Text       = Global.LoginUser.UserName;
            txtCreater.Tag        = Global.LoginUser.FID;
            txtCreater.Enabled    = false;
            dateDatetime.DateTime = DateTime.Now;

            _service = new ApiService.APIServiceClient("BasicHttpBinding_IAPIService", Global.WcfUrl);
            try
            {
                #region 请购计划列表

                initComboBox();


                foreach (CodeValueClass item in cbo状态.Properties.Items)
                {
                    if (item.value == status.ToStr())
                    {
                        cbo状态.SelectedItem = item;
                    }
                }

                //var list = _service.GetPurchasePlanList("", "", status, "", !chkClose.Checked);
                //gridControl请购计划列表.DataSource = list;
                //lbl记录数.Text = string.Format("共查询得到记录{0}条", list.Count());
                #endregion

                #region 销区列表
                var marketAreaList = _service.GetDics("101", "", true);

                //treeList销区.DataSource = marketAreaList;

                #endregion

                bgw加载数据.RunWorkerAsync();
            }
            catch (Exception ex)
            {
                LogError(ex);
            }
        }
        public FrmPurchasePlanImport(string pbrandid, List <string> pEntryID)
        {
            InitializeComponent();

            brandid = pbrandid;

            _service = new ApiService.APIServiceClient("BasicHttpBinding_IAPIService", Global.WcfUrl);
            try
            {
                #region 请购计划列表

                initComboBox();


                //var list = _service.GetPurchasePlanList("", "", status, "", !chkClose.Checked);
                //gridControl请购计划列表.DataSource = list;
                //lbl记录数.Text = string.Format("共查询得到记录{0}条", list.Count());
                #endregion

                #region 销区列表
                var marketAreaList = _service.GetDics("101", "", true);

                //treeList销区.DataSource = marketAreaList;

                #endregion

                bgw加载数据.RunWorkerAsync();


                listEntryID = pEntryID;
            }
            catch (Exception ex)
            {
                LogError(ex);
            }

            query.startTime = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 0:0:0"));
            query.endTime   = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 23:59:59"));
            query.t_status  = "0";
            query.brand     = "01";

            onSearch();
        }
Beispiel #12
0
        public FrmPPPConfirm(string icprbillid, string action)
        {
            InitializeComponent();

            this._icprbillid = icprbillid;
            this._Action     = action;
            _service         = new ApiService.APIServiceClient("BasicHttpBinding_IAPIService", Global.WcfUrl);
            _DataSource      = _service.GetPurchasePlanEntryList(icprbillid, action == "unconfirm" ? "7" : "3", false);
            foreach (var model in _DataSource)
            {
                model.FCOMMITQTY = model.FORDERUNITQTY;
            }
            gridControl请购计划明细.DataSource = _DataSource;

            if (_Action == "unconfirm")
            {
                btn采购确认.Text = "反确认";
            }
        }
Beispiel #13
0
        public FrmOrderList(int status = 3)
        {
            InitializeComponent();

            gridView采购订单列表.OptionsSelection.MultiSelect     = true;
            gridView采购订单列表.OptionsSelection.MultiSelectMode = DevExpress.XtraGrid.Views.Grid.GridMultiSelectMode.CheckBoxRowSelect;
            gridControl采购订单明细.MouseWheel += GridControl采购订单明细_MouseWheel;

            _service = new ApiService.APIServiceClient("BasicHttpBinding_IAPIService", Global.WcfUrl);
            try
            {
                #region 请购计划列表

                initComboBox();



                //var list = _service.GetPurchasePlanList("", "", status, "", !chkClose.Checked);
                //gridControl请购计划列表.DataSource = list;
                //lbl记录数.Text = string.Format("共查询得到记录{0}条", list.Count());
                #endregion

                #region 销区列表
                // var marketAreaList = _service.GetDics("101", "", true);

                //treeList销区.DataSource = marketAreaList;

                #endregion

                bgw加载数据.RunWorkerAsync();

                query.startTime = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 0:0:0"));
                query.endTime   = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 23:59:59"));
                query.t_status  = "0";
                query.bClose    = true;
                onSearch();
            }
            catch (Exception ex)
            {
                LogError(ex);
            }
        }
Beispiel #14
0
        public FrmPurchaseOrderTemp2(V_ICPOBILLMODEL pModel)
        {
            InitializeComponent();
            _service = new ApiService.APIServiceClient("BasicHttpBinding_IAPIService", Global.WcfUrl);


            model                 = pModel;
            txtCreater.Text       = model.FBILLERNAME;
            txtCreater.Tag        = model.FBILLER;
            txtCreater.Enabled    = false;
            dateDatetime.DateTime = model.FBILLDATE;
            var listAccount = _service.GetClientAccountList(model.FBRANDID, "");

            foreach (var sub in listAccount)
            {
                if (sub.FID == model.FCLIENTID)
                {
                    txt厂家账户.Tag  = sub.FID;
                    txt厂家账户.Text = sub.FNAME;
                }
            }
            txtPhone.Text   = model.FTELEPHONE;
            txtRemarks.Text = model.FREMARK;


            //初始化品牌列表
            var list = _service.GetBrandList(Global.LoginUser);

            foreach (var item in list)
            {
                comBrand.Properties.Items.Add(item);
                if (item.FID == model.FBRANDID)
                {
                    comBrand.SelectedItem = item;
                }
            }

            listCG = _service.GetOrderEntryList(model.FID, null).ToList();

            gridControl采购订单列表.DataSource = listCG;
        }
Beispiel #15
0
        public frm库存查询(int status = 3)
        {
            InitializeComponent();

            _service = new ApiService.APIServiceClient("BasicHttpBinding_IAPIService", Global.WcfUrl);
            //初始化品牌列表
            var list = _service.GetBrandList(Global.LoginUser);

            foreach (var item in list)
            {
                cbo品牌.Properties.Items.Add(item);

                string brandid = IniHelper.ReadString(Global.IniUrl, "CONFIG", "FBRANDID", "");
                if (item.FID == brandid)
                {
                    cbo品牌.SelectedItem = item;
                }
            }

            loadDrop();
        }
        public FrmSendGoodsPlan(int status = -1)
        {
            InitializeComponent();

            _service = new ApiService.APIServiceClient("BasicHttpBinding_IAPIService", Global.WcfUrl);
            try
            {
                //var list = _service.GetDeliveryList("", "", "", 0, "", "");
                //gridControl发货计划列表.DataSource = list;
                ////lbl记录数.Text = string.Format("共查询得到记录{0}条", list.Count());



                // bgw加载数据.RunWorkerAsync();

                initComboBox();

                txt日期开始.Text = formatDateTime(DateTime.Now.AddDays(-7));
                txt日期结束.Text = formatDateTime(DateTime.Now);

                foreach (CodeValueClass item in cbo状态.Properties.Items)
                {
                    if (item.value == status.ToStr())
                    {
                        cbo状态.SelectedItem = item;
                    }
                }

                #region 销区列表
                var marketAreaList = _service.GetDics("101", "", true);
                treeList销区.DataSource = marketAreaList;
                #endregion
            }
            catch (Exception ex)
            {
                LogError(ex);
            }
        }
Beispiel #17
0
 private void FrmOutOrderList_Load(object sender, EventArgs e)
 {
     _service = new ApiService.APIServiceClient("BasicHttpBinding_IAPIService", Global.WcfUrl);
     Init();
 }
Beispiel #18
0
        public FrmIndex()
        {
            InitializeComponent();

            _service = new ApiService.APIServiceClient("BasicHttpBinding_IAPIService", Global.WcfUrl);
        }
        public FrmPurchaseOrder(V_ICPOBILLMODEL pModel, bool bzf = false)
        {
            InitializeComponent();

            _service = new ApiService.APIServiceClient("BasicHttpBinding_IAPIService", Global.WcfUrl);



            if (!pModel.FPREMISEID.Empty())
            {
                var mcu = _service.GetJYDW(pModel.FPREMISEID);
                txtMcu.Tag  = mcu.First();
                txtMcu.Text = mcu.First().FNAME;
            }


            ICPOBILLMODELm = _service.GetSingleOrder(pModel.FID);
            IniValue();
            bEdit                 = true;
            model                 = pModel;
            txtCreater.Text       = model.FBILLERNAME;
            txtCreater.Tag        = model.FBILLER;
            txtCreater.Enabled    = false;
            dateDatetime.DateTime = model.FBILLDATE;
            var listAccount = _service.GetClientAccountList(model.FBRANDID, "");

            txtBillNO.Text = model.FBILLNO;

            txtProjectNo.Text = ICPOBILLMODELm.FprojectNO;

            //
            foreach (var sub in listAccount)
            {
                if (sub.FID == model.FCLIENTID)
                {
                    txt厂家账户.Tag   = sub.FID;
                    txt厂家账户.Text  = sub.FACCOUNT;
                    txtFName.Text = sub.FNAME;
                    break;
                }
            }

            txtRemarks.Text          = model.FREMARK;
            search价格策略.Text          = model.Fpricepolicy;
            search价格策略.Tag           = model.Fpricepolicy;
            searchDic105.Text        = model.FPOtype;
            searchDic105.Tag         = model.FPOtype;
            txtLH_OUTBOUNDORDER.Text = ICPOBILLMODELm.LH_OUTBOUNDORDER;
            dateDHRQ.Text            = ICPOBILLMODELm.LH_EXPECTEDARRIVEDDATE.ToStr();
            //初始化品牌列表
            var list = _service.GetBrandList(Global.LoginUser);


            foreach (var item in list)
            {
                comBrand.Properties.Items.Add(item);
                if (item.FID == model.FBRANDID)
                {
                    comBrand.SelectedItem = item;
                }
            }

            listCG = _service.GetOrderEntryList(model.FID, null).ToList();

            var tmp = _service.ICPOBILLENTRYMODEL_List(model.FID);

            foreach (var item in tmp)
            {
                var mtiem = listCG.Where(w => w.FID.Equals(item.FID)).FirstOrDefault();
                mtiem.FERR_MESSAGE = item.FERR_MESSAGE;
                mtiem.FSRCMODEL    = item.FSRCMODEL;
                mtiem.FORDERUNIT   = item.Funit;
                mtiem.Funit        = item.Funit;
                mtiem.Flevel       = item.Flevel;
            }
            foreach (var sub in listCG)
            {
                ProductViewModel pro = _service.getProductView(sub.FITEMID);
                if (pro == null)
                {
                    continue;
                }
                sub.Funit      = pro.FUNITNAME;
                sub.FSRCMODEL  = pro.FSRCMODEL;
                sub.FORDERUNIT = pro.FSRCUNIT;
                sub.FMODEL     = pro.FMODEL;
                sub.FSRCCODE   = pro.FSRCCODE;
            }

            listCG = listCG.OrderBy(x => x.GG).ToList().OrderBy(x => x.GG).ToList();

            gridControl采购订单明细.DataSource = listCG;



            if (bzf)
            {
                simpleButton3.Visible = false;
                simpleButton1.Visible = false;
                simpleButton6.Visible = false;
                simpleButton5.Visible = false;
                simpleButton2.Visible = false;

                btnZF.Visible          = true;
                simpleButton7.Location = simpleButton1.Location;
                simpleButton4.Location = simpleButton6.Location;
            }
            else
            {
                simpleButton3.Visible = true;
                simpleButton1.Visible = true;
                simpleButton6.Visible = true;
                simpleButton5.Visible = true;
                simpleButton2.Visible = true;
                btnZF.Visible         = false;
            }
            onCalcWeightTotal();
            initComboBox();
        }
Beispiel #20
0
 public FrmNewQueryProduct()
 {
     //instance = new FrmNewQueryProduct();
     InitializeComponent();
     _service = new ApiService.APIServiceClient("BasicHttpBinding_IAPIService", Global.WcfUrl);
 }
Beispiel #21
0
 public FrmQuerySrc(string productid)
 {
     InitializeComponent();
     _service   = new ApiService.APIServiceClient("BasicHttpBinding_IAPIService", Global.WcfUrl);
     _ProductID = productid;
 }
 public FrmQueryExpressCompany()
 {
     InitializeComponent();
     _service = new ApiService.APIServiceClient("BasicHttpBinding_IAPIService", Global.WcfUrl);
 }
Beispiel #23
0
 public FrmQueryClientAccount(string brandid)
 {
     InitializeComponent();
     _service = new ApiService.APIServiceClient("BasicHttpBinding_IAPIService", Global.WcfUrl);
     _brandID = brandid;
 }
Beispiel #24
0
        public FrmPurchaseOrder(V_ICPOBILLMODEL pModel, bool bzf = false)
        {
            InitializeComponent();
            _service = new ApiService.APIServiceClient("BasicHttpBinding_IAPIService", Global.WcfUrl);
            IniValue();
            bEdit                 = true;
            model                 = pModel;
            txtCreater.Text       = model.FBILLERNAME;
            txtCreater.Tag        = model.FBILLER;
            txtCreater.Enabled    = false;
            dateDatetime.DateTime = model.FBILLDATE;
            var listAccount = _service.GetClientAccountList(model.FBRANDID, "");

            txtBillNO.Text = model.FBILLNO;

            txtProjectNo.Text = pModel.FprojectNO;



            //


            foreach (var sub in listAccount)
            {
                if (sub.FID == model.FCLIENTID)
                {
                    txt厂家账户.Tag   = sub.FID;
                    txt厂家账户.Text  = sub.FACCOUNT;
                    txtFName.Text = sub.FNAME;
                }
            }

            txtRemarks.Text   = model.Fnote;
            search价格策略.Text   = model.Fpricepolicy;
            search价格策略.Tag    = model.Fpricepolicy;
            searchDic105.Text = model.FPOtype;
            searchDic105.Tag  = model.FPOtype;

            //初始化品牌列表
            var list = _service.GetBrandList(Global.LoginUser);

            foreach (var item in list)
            {
                comBrand.Properties.Items.Add(item);
                if (item.FID == model.FBRANDID)
                {
                    comBrand.SelectedItem = item;
                }
            }

            listCG = _service.GetOrderEntryList(model.FID, null).ToList();

            foreach (var sub in listCG)
            {
                ProductViewModel pro = _service.getProductView(sub.FITEMID);
                if (pro == null)
                {
                    continue;
                }
                sub.Funit        = pro.FUNITNAME;
                sub.FSRCMODEL    = pro.FSRCMODEL;
                sub.FORDERUNIT   = pro.FSRCUNIT;
                sub.FMODEL       = pro.FMODEL;
                sub.FSRCMODEL    = pro.FSRCMODEL;
                sub.FSRCCODE     = pro.FSRCCODE;
                sub.FPRODUCTCODE = sub.FPRODUCTCODE;
            }

            listCG = listCG.OrderBy(x => x.GG).ToList().OrderBy(x => x.GG).ToList();

            gridControl采购订单明细.DataSource = listCG;



            if (bzf)
            {
                simpleButton3.Visible = false;
                simpleButton1.Visible = false;
                simpleButton6.Visible = false;
                simpleButton5.Visible = false;
                simpleButton2.Visible = false;

                btnZF.Visible          = true;
                simpleButton7.Location = simpleButton1.Location;
                simpleButton4.Location = simpleButton6.Location;
            }
            else
            {
                simpleButton3.Visible = true;
                simpleButton1.Visible = true;
                simpleButton6.Visible = true;
                simpleButton5.Visible = true;
                simpleButton2.Visible = true;
                btnZF.Visible         = false;
            }
            onCalcWeightTotal();
        }
 public FrmQueryDeliverBase(string brand)
 {
     InitializeComponent();
     _service = new ApiService.APIServiceClient("BasicHttpBinding_IAPIService", Global.WcfUrl);
     _brand   = brand;
 }
        string optType = "0";//
        private void backgroundWorker2_DoWork(object sender, DoWorkEventArgs e)
        {
            tuMessage = "";


            switch (optType)
            {
            case "0":
                try
                {
                    listSearch = _service.GetOrderList(
                        Global.LoginUser,
                        "", query.brand, int.Parse((query.t_status == null ? "0" : query.t_status)), "", query.P_BillNo,
                        query.startTime.ToString(),
                        query.endTime.ToStr(),
                        !query.bClose);
                }
                catch (Exception ee)
                {
                    tuMessage = ee.ToString();
                }
                break;

            case "1":    //shenhe
                try
                {
                    foreach (var sub111 in fid_sh)
                    {
                        var listEntry = _service.GetOrderEntryList(sub111, null);
                        List <ICPOBILLENTRYMODEL> listICPO = new List <ICPOBILLENTRYMODEL>();
                        foreach (var sub in listEntry)
                        {
                            ICPOBILLENTRYMODEL t = new ICPOBILLENTRYMODEL();
                            t.FENTRYID    = sub.FENTRYID;
                            t.FICPOBILLID = sub.FICPOBILLID;
                            t.FID         = sub.FID;

                            listICPO.Add(t);
                        }

                        if (_service.AuditSave_ICPO(listICPO.ToArray(), Global.LoginUser, ""))
                        {
                            // MsgHelper.ShowInformation("审核成功!");
                            try
                            {
                                listSearch = _service.GetOrderList(
                                    Global.LoginUser,
                                    "", query.brand, int.Parse((query.t_status == null ? "0" : query.t_status)), "", query.P_BillNo,
                                    query.startTime.ToString(),
                                    query.endTime.ToStr(),
                                    !query.bClose);
                            }
                            catch (Exception ee)
                            {
                                tuMessage = ee.ToString();
                            }
                        }
                        else
                        {
                            //MsgHelper.ShowInformation("审核失败!");
                        }
                    }
                }
                catch (Exception ee)
                {
                    tuMessage = ee.ToStr();
                }
                break;

            case "2":
                try
                {
                    foreach (var sub11 in fid_fs)
                    {
                        var listEntry1 = _service.GetOrderEntryList(sub11, null);
                        List <ICPOBILLENTRYMODEL> listICPO1 = new List <ICPOBILLENTRYMODEL>();
                        foreach (var sub in listEntry1)
                        {
                            ICPOBILLENTRYMODEL t = new ICPOBILLENTRYMODEL();
                            t.FENTRYID    = sub.FENTRYID;
                            t.FICPOBILLID = sub.FICPOBILLID;
                            t.FID         = sub.FID;
                            listICPO1.Add(t);
                        }

                        if (_service.UnAuditSave_ICPO(listICPO1.ToArray(), Global.LoginUser, ""))
                        {
                            //  MsgHelper.ShowInformation("反审成功!");
                            try
                            {
                                listSearch = _service.GetOrderList(
                                    Global.LoginUser,
                                    "", query.brand, int.Parse((query.t_status == null ? "0" : query.t_status)), "", query.P_BillNo,
                                    query.startTime.ToString(),
                                    query.endTime.ToStr(),
                                    !query.bClose);
                            }
                            catch (Exception ee)
                            {
                                tuMessage = ee.ToString();
                            }
                        }
                        else
                        {
                            MsgHelper.ShowInformation("反审失败!");
                        }
                    }
                }
                catch (Exception ee)
                {
                    tuMessage = ee.ToStr();
                }
                break;

            case "3":
                try
                {
                    ApiService.APIServiceClient mapi = new ApiService.APIServiceClient();
                    foreach (var sub22 in fid_tb)
                    {
                        string s = mapi.Remote_InsertICPOEntry(sub22.Value);

                        if (!s.Contains("error"))
                        {
                            Dictionary <int, string> dicEntryID_THDBMDetail = new Dictionary <int, string>();
                            try
                            {
                                MApiModel.api24.Rootobject api24 = new MApiModel.api24.Rootobject();
                                api24.action = "getMN_cp_24";
                                api24.token  = "";

                                DateTime theTime = DateTime.Now;
                                string   rq1     = theTime.Year + "/" + (theTime.Month < 10 ? "0" + theTime.Month.ToStr() : theTime.Month.ToStr()) + "/" + (theTime.Day < 10 ? "0" + theTime.Day.ToStr() : theTime.Day.ToStr());

                                api24.rq1       = rq1;
                                api24.rq2       = rq1;
                                api24.pageIndex = 1;
                                api24.pageSize  = 200;
                                api24.pzhm      = s;

                                MApiModel.recApi24.Rootobject r24 = new MApiModel.recApi24.Rootobject();
                                r24 = _service.Remote_Get24(api24);

                                Regex reg = new Regex("(\\d+)");

                                foreach (var subb in r24.resultInfo)
                                {
                                    if (!string.IsNullOrEmpty(subb.khhm1) && reg.IsMatch(subb.khhm1))
                                    {
                                        int iEndtry = int.Parse(reg.Match(subb.khhm1).Groups[1].Value);
                                        if (dicEntryID_THDBMDetail.ContainsKey(iEndtry))
                                        {
                                            dicEntryID_THDBMDetail.Add(iEndtry, subb.autoid);
                                        }
                                    }
                                }
                            }
                            catch (Exception ee)
                            {
                                Console.WriteLine(ee.Message);
                            }


                            _service.Update_FSYN_Remote_Status(sub22.Key, 4, s, dicEntryID_THDBMDetail);

                            MsgHelper.ShowInformation("同步完毕!");
                            try
                            {
                                listSearch = _service.GetOrderList(
                                    Global.LoginUser,
                                    "", query.brand, int.Parse((query.t_status == null ? "0" : query.t_status)), "", query.P_BillNo,
                                    query.startTime.ToString(),
                                    query.endTime.ToStr(),
                                    !query.bClose);
                            }
                            catch (Exception ee)
                            {
                                tuMessage = ee.ToString();
                            }
                        }
                        else
                        {
                            MsgHelper.ShowError(s);
                        }
                    }
                }
                catch (Exception ee)
                {
                    tuMessage = ee.ToStr();
                }

                break;

            case "4":
                var listEntry5 = _service.GetOrderEntryList(fid_close, null);
                List <ICPOBILLENTRYMODEL> listICPO5 = new List <ICPOBILLENTRYMODEL>();
                foreach (var sub in listEntry5)
                {
                    ICPOBILLENTRYMODEL t = new ICPOBILLENTRYMODEL();
                    t.FENTRYID    = sub.FENTRYID;
                    t.FICPOBILLID = sub.FICPOBILLID;
                    t.FID         = sub.FID;
                    listICPO5.Add(t);
                }

                if (_service.CloseSave_ICPO(listICPO5.ToArray(), Global.LoginUser, ""))
                {
                    MsgHelper.ShowInformation("关闭成功!");
                    try
                    {
                        listSearch = _service.GetOrderList(
                            Global.LoginUser,
                            "", query.brand, int.Parse((query.t_status == null ? "0" : query.t_status)), "", query.P_BillNo,
                            query.startTime.ToString(),
                            query.endTime.ToStr(),
                            !query.bClose);
                    }
                    catch (Exception ee)
                    {
                        tuMessage = ee.ToString();
                    }
                }
                else
                {
                    MsgHelper.ShowInformation("关闭失败!");
                }

                break;

            case "5":
                if (_service.Delete_ICPO(fid_delete))
                {
                    MsgHelper.ShowInformation("删除成功!");
                    try
                    {
                        listSearch = _service.GetOrderList(
                            Global.LoginUser,
                            "", query.brand, int.Parse((query.t_status == null ? "0" : query.t_status)), "", query.P_BillNo,
                            query.startTime.ToString(),
                            query.endTime.ToStr(),
                            !query.bClose);
                    }
                    catch (Exception ee)
                    {
                        tuMessage = ee.ToString();
                    }
                }
                else
                {
                    MsgHelper.ShowInformation("删除失败!");
                }
                break;

            case "6":
                try
                {
                    listDetail = _service.GetOrderEntryList(fid_detail, null);
                }
                catch (Exception ee)
                {
                    tuMessage = ee.ToString();
                }
                break;
            }
        }
Beispiel #27
0
 public FrmQueryDictionary(string categorycode)
 {
     InitializeComponent();
     _service      = new ApiService.APIServiceClient("BasicHttpBinding_IAPIService", Global.WcfUrl);
     _categoryCode = categorycode;
 }