Esempio n. 1
0
 private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     try
     {
         DataTable dtPP = BasicClass.GetDataSet.GetDS("Hownet.BLL.ProductionPlan", "GetList", new object[] { "(SalesOrderInfoID=" + gridView1.GetFocusedRowCellValue(_coID) + ")" }).Tables[0];
         if (dtPP.Rows.Count > 0)
         {
             if (Convert.ToInt32(dtPP.Rows[0]["ID"]) > 0)
             {
                 this.Cursor = System.Windows.Forms.Cursors.WaitCursor;
                 // string formName = "WMS.frTaskBOM";
                 if (!BasicClass.BasicFile.IsHavePermissions((int)BasicClass.Enums.Operation.View, "生产计划"))
                 {
                     XtraMessageBox.Show("沒有权限!");
                     return;
                 }
                 //System.Reflection.Assembly assembly = Assembly.Load(formName.Split('.')[0]);// System.Reflection.Assembly.GetExecutingAssembly();
                 //Form f = (Form)assembly.CreateInstance(formName);
                 //Type t = assembly.GetType(formName);
                 //t.InvokeMember("_MainID", BindingFlags.SetField, null, f, new object[] { Convert.ToInt32(dtPP.Rows[0]["ID"]) });
                 //f.ShowDialog();
                 Form fr = new WMS.frTaskBOM(Convert.ToInt32(dtPP.Rows[0]["ID"]));
                 fr.ShowDialog();
             }
         }
     }
     catch (Exception ex)
     {
     }
     finally
     {
         this.Cursor = System.Windows.Forms.Cursors.Default;
     }
 }
Esempio n. 2
0
 private void label49_Click(object sender, EventArgs e)
 {
     if (BasicClass.BasicFile.GetPermissions("生产计划") != string.Empty)
     {
         Form fr = new WMS.frTaskBOM();
         fr.ShowDialog();
     }
     else
     {
         MessageBox.Show("没有权限 ");
     }
 }
Esempio n. 3
0
 private void barButtonItem6_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     if (gridView1.FocusedRowHandle > -1)
     {
         if (Convert.ToInt32(gridView1.GetFocusedRowCellValue(_coParentID)) > 0)
         {
             DataTable dtTem = new DataTable();
             dtTem.Columns.Add("ID", typeof(int));
             dtTem.Rows.Add(Convert.ToInt32(gridView1.GetFocusedRowCellValue(_coParentID)));
             Form fr = new WMS.frTaskBOM(dtTem);
             fr.ShowDialog();
         }
     }
 }