예제 #1
0
        //供应商信息
        private void button1_Click(object sender, EventArgs e)
        {
            frmGonYingShang frmgong = new frmGonYingShang();

            frmgong.Owner = this;
            frmgong.ShowDialog();
        }
예제 #2
0
 private void toolSave_Click(object sender, EventArgs e)
 {
     if (GetCount() == 1)
     {
         if (intFalg == 1)
         {
             if (CompanyMenthod.tb_CompanyMenthodAdd(Company) == 1)
             {
                 if (intReturn == 1)
                 {
                     frmGonYingShang frmCop = (frmGonYingShang)this.Owner;
                     jhgood.filltProd(frmCop.treeView1, frmCop.imageList1);
                     ClearControls();
                     ControlStatus();
                     intFalg = 0;
                     this.Close();
                 }
                 MessageBox.Show("添加成功");
                 intFalg = 0;
                 CompanyMenthod.tb_CompanyFind("", 3, dataGridView1);
                 ClearControls();
                 ControlStatus();
             }
             else
             {
                 MessageBox.Show("添加失败");
                 intFalg = 0;
                 CompanyMenthod.tb_CompanyFind("", 3, dataGridView1);
                 ClearControls();
                 ControlStatus();
             }
         }
         if (intFalg == 2)
         {
             if (CompanyMenthod.tb_CompanyMenthodUpDate(Company) == 1)
             {
                 MessageBox.Show("修改成功");
                 intFalg = 0;
                 CompanyMenthod.tb_CompanyFind("", 3, dataGridView1);
                 ClearControls();
                 ControlStatus();
             }
             else
             {
                 MessageBox.Show("修改失败");
                 intFalg = 0;
                 CompanyMenthod.tb_CompanyFind("", 3, dataGridView1);
                 ClearControls();
                 ControlStatus();
             }
         }
         if (intFalg == 3)
         {
             if (CompanyMenthod.tb_CompanyMenthodDelete(Company) == 1)
             {
                 MessageBox.Show("删除成功");
                 intFalg = 0;
                 CompanyMenthod.tb_CompanyFind("", 3, dataGridView1);
                 ClearControls();
                 ControlStatus();
             }
             else
             {
                 MessageBox.Show("删除失败");
                 intFalg = 0;
                 CompanyMenthod.tb_CompanyFind("", 3, dataGridView1);
                 ClearControls();
                 ControlStatus();
             }
         }
     }//
 }