コード例 #1
0
        /// <summary>
        /// clearing textbox and reloading datagrid
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button_U_M_Cancel_Click(object sender, EventArgs e)
        {
            ItemU_M_Helper um = new ItemU_M_Helper();

            um.ClearDataGridView_t_ItemU_M(textBox_ItemU_M);
            um.populateDataGridView_t_ItemU_M(dataGridView_U_M);
        }
コード例 #2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            //populateDataGridView_t_ItemU_M();
            ItemU_M_Helper um = new ItemU_M_Helper();

            um.ClearDataGridView_t_ItemU_M(textBox_ItemU_M);
            um.populateDataGridView_t_ItemU_M(dataGridView_U_M);
            populateDataGridViewItems();
            populateDataGridView_t_Orders();
        }
コード例 #3
0
        /// <summary>
        /// measurement unit editng , need double click on datagrid before to poplate text box's
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button_U_M_Edit_Click(object sender, EventArgs e)
        {
            //ItemU_M_Helper um = new ItemU_M_Helper();
            //um.editItemU_M(textBox_ItemU_M.Text.Trim(), textBox_ItemU_M, dataGridView_U_M);

            model_t_ItemU_M.ItemU_M = textBox_ItemU_M.Text.Trim();
            using (testDBEntities db = new testDBEntities())
            {
                db.Entry(model_t_ItemU_M).State = EntityState.Modified;
                db.SaveChanges();
            }
            ItemU_M_Helper um = new ItemU_M_Helper();

            um.ClearDataGridView_t_ItemU_M(textBox_ItemU_M);
            um.populateDataGridView_t_ItemU_M(dataGridView_U_M);
            //ClearDataGridView_t_ItemU_M();
            //populateDataGridView_t_ItemU_M();
            MessageBox.Show("Submitted Successfully");
        }
コード例 #4
0
        /// <summary>
        /// del measurement unit
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button_U_M_Del_Click(object sender, EventArgs e)
        {
            ItemU_M_Helper um = new ItemU_M_Helper();

            um.Del_U_M_Record(model_t_ItemU_M, textBox_ItemU_M, dataGridView_U_M);
        }
コード例 #5
0
        //////////////////////
        //   U_M functions tab
        //////////////////////
        /// <summary>
        /// adding measurement unit
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button_U_M_Add_Click(object sender, EventArgs e)
        {
            ItemU_M_Helper um = new ItemU_M_Helper();

            um.addItemU_M(textBox_ItemU_M.Text.Trim(), textBox_ItemU_M, dataGridView_U_M);
        }