コード例 #1
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);
                }
            }
        }
コード例 #2
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);
                    }
                }
            }
        }
コード例 #3
0
ファイル: frmAddSuitFood.cs プロジェクト: uwitec/carrey-rms
 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);
         }
     }
 }
コード例 #4
0
ファイル: frmAddSuitFood.cs プロジェクト: uwitec/carrey-rms
        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);
                    }

                }
            }
        }