Exemple #1
0
 public MainForm(bool isPreload = true)
 {
     InitializeComponent();
     this.Text       = "罗斯(无锡)PLM数据同步工具" + Application.ProductName + " v" + Application.ProductVersion;
     Utility         = new Utilities();
     SysConfig       = Utility.GetSysCfg();
     SLabelUser.Text = BasicDatas.CurrentUser;
     CurrentDgv      = this.dataGridViewMain;
     if (SysConfig != null)
     {
         RLD     = new RossLiveRespository();
         RossCfg = RLD.GetRossCfg();
         ERP     = new ERPRepository(SysConfig.ERPConn);
         PLM     = new PLMRespository(SysConfig.PLMConn, RossCfg.Units);
         BscData = new BasicDatas(SysConfig.ERPConn, SysConfig.PLMConn);
         InitData();
         if (isPreload)
         {
             FormLoading formLoad = new FormLoading(SysConfig.ERPConn, SysConfig.PLMConn);
             formLoad.ShowDialog();
             formLoad.Owner = this;
         }
     }
     else
     {
         MessageBox.Show("配置文件错误,请联系软件供应商!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Exemple #2
0
        private void ToolStripMenuItem_ResetCache_Click(object sender, EventArgs e)
        {
            FormLoading formLoad = new FormLoading(SysConfig.ERPConn, SysConfig.PLMConn);

            formLoad.ShowDialog();
            formLoad.Owner = this;
        }
Exemple #3
0
        private void BtnImportNewBOM_Click(object sender, System.EventArgs e)
        {
            string PartNum = tboxPartNum.Text.Trim();

            if (!string.IsNullOrEmpty(PartNum))
            {
                if (MessageBox.Show("需要更新本地缓存吗?", "系统提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
                {
                    FormLoading formLoad = new FormLoading(SysConfig.ERPConn, SysConfig.PLMConn);
                    formLoad.ShowDialog();
                    formLoad.Owner = this;
                }
                ImportNewBOM(new string[] { PartNum }, false);
            }
            else
            {
                MessageBox.Show("请输入产品码!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }