Beispiel #1
0
        private void ManageRoute_Load(object sender, EventArgs e)
        {
            drm = new delegateroutemanage(LoadData);
            drm.BeginInvoke(null, null);

            string [] item = refWebtBomKeyPart.Instance.GetBomNumerList();
            foreach (string im in item)
            {
                cb_bomnumber.Items.Add(im);
            }
        }
Beispiel #2
0
        private void bt_save_Click(object sender, EventArgs e)
        {
            try
            {
                if (string.IsNullOrEmpty(this.tb_routgroupid.Text.Trim()))
                {
                    throw new Exception("流程编号不能为空!");
                }
                if (string.IsNullOrEmpty(this.tb_partnumber.Text.Trim()))
                {
                    throw new Exception("成品料号不能为空!");
                }

                Dictionary <string, object> dic = new Dictionary <string, object>();
                dic.Add("ROUTGROUPID", tb_routgroupid.Text.Trim());
                dic.Add("PARTNUMBER", tb_partnumber.Text.Trim());
                dic.Add("PRODUCTNAME", tb_productname.Text.Trim());
                dic.Add("BOMNUMBER", cb_bomnumber.Text.Trim());
                refWebtRouteInfo.Instance.InsertRouteManage(FrmBLL.ReleaseData.DictionaryToJson(dic));
                //refWebtRouteInfo.Instance.InsertRouteManage(new WebServices.tRouteInfo.tRouteInfo1()
                //{
                //    routgroupId = this.tb_routgroupid.Text.Trim(),
                //    Partnumber = this.tb_partnumber.Text.Trim(),
                //    ProductName = this.tb_productname.Text.Trim(),
                //    BomNumber = this.cb_bomnumber.Text.Trim()
                //});

                MessageBox.Show("添加成功");
                drm = new delegateroutemanage(LoadData);
                drm.BeginInvoke(null, null);
                bt_clear_Click(null, null);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }