private void DataGrid1_DragDrop(System.Object sender, System.Windows.Forms.DragEventArgs e)
        {
            string foodname;

            foodname = e.Data.GetData(DataFormats.Text).ToString();
            frmAddSuitFoodQty frmaddsfq = new frmAddSuitFoodQty();

            frmaddsfq.Label1.Text = "菜品名称:" + foodname + "   单位:" + rms_var.GetFoodUnit(foodname) + "\r\n" + "单价:" + rms_var.GetFoodPrice(foodname);
            frmaddsfq.ShowDialog();
            if (frmaddsfq.DialogResult == DialogResult.OK)
            {
                //添加记录
                if (AddSuitFood(suitcode, rms_var.GetFoodCode(foodname), frmaddsfq.NumericUpDown1.Text))
                {
                    LoadSuitFoodsList(suitcode);
                }
            }
        }
        private void Button4_Click(System.Object sender, System.EventArgs e)
        {
            if (!(TreeView1.SelectedNode.GetNodeCount(true) > 0))
            {
                string foodname;
                foodname = TreeView1.SelectedNode.Text;

                frmAddSuitFoodQty frmaddsfq = new frmAddSuitFoodQty();
                frmaddsfq.Label1.Text = "菜品名称:" + foodname + "   单位:" + rms_var.GetFoodUnit(foodname) + "\r\n" + "单价:" + rms_var.GetFoodPrice(foodname);
                frmaddsfq.ShowDialog();
                if (frmaddsfq.DialogResult == DialogResult.OK)
                {
                    //添加记录
                    if (AddSuitFood(suitcode, rms_var.GetFoodCode(foodname), frmaddsfq.NumericUpDown1.Text))
                    {
                        LoadSuitFoodsList(suitcode);
                    }
                }
            }
        }
Beispiel #3
0
 private void DataGrid1_DragDrop(System.Object sender, System.Windows.Forms.DragEventArgs e)
 {
     string foodname;
     foodname = e.Data.GetData(DataFormats.Text).ToString();
     frmAddSuitFoodQty frmaddsfq = new frmAddSuitFoodQty();
     frmaddsfq.Label1.Text = "菜品名称:" + foodname + "   单位:" + rms_var.GetFoodUnit(foodname) + "\r\n" + "单价:" + rms_var.GetFoodPrice(foodname);
     frmaddsfq.ShowDialog();
     if (frmaddsfq.DialogResult == DialogResult.OK)
     {
         //添加记录
         if (AddSuitFood(suitcode, rms_var.GetFoodCode(foodname), frmaddsfq.NumericUpDown1.Text))
         {
             LoadSuitFoodsList(suitcode);
         }
     }
 }
Beispiel #4
0
        private void Button4_Click(System.Object sender, System.EventArgs e)
        {
            if (! (TreeView1.SelectedNode.GetNodeCount(true) > 0))
            {
                string foodname;
                foodname = TreeView1.SelectedNode.Text;

                frmAddSuitFoodQty frmaddsfq = new frmAddSuitFoodQty();
                frmaddsfq.Label1.Text = "菜品名称:" + foodname + "   单位:" + rms_var.GetFoodUnit(foodname) + "\r\n" + "单价:" + rms_var.GetFoodPrice(foodname);
                frmaddsfq.ShowDialog();
                if (frmaddsfq.DialogResult == DialogResult.OK)
                {
                    //添加记录
                    if (AddSuitFood(suitcode, rms_var.GetFoodCode(foodname), frmaddsfq.NumericUpDown1.Text))
                    {
                        LoadSuitFoodsList(suitcode);
                    }

                }
            }
        }