Example #1
0
        private void btn_Save_Click(object sender, EventArgs e)
        {
            try
            {
                if (cbo_Created_By.SelectedIndex == -1 || cbo_Sto_Name_From.SelectedIndex == -1 || cbo_Sto_Name_To.SelectedIndex == -1)
                {
                    MessageBox.Show("You must Choose Employee and Store_From Name and Store_To_Name");
                }
                else
                {
                    if (edit_or_add == "add")
                    {
                        Insert_Transferring_And_Items();
                        frm_Find_Transferring_From_To f = new frm_Find_Transferring_From_To();
                        this.Close();
                        f.Show();
                    }
                    else if (edit_or_add == "edit")
                    {
                        Update_Transferring_Without_Items();

                        // first delete Transferring details (items)
                        Delete_All_Items();
                        ////then insertohm mn 2wel w gdeed
                        Insert_FromDGV_ToDB();
                        MessageBox.Show("Edited");
                        frm_Find_Transferring_From_To f = new frm_Find_Transferring_From_To();
                        this.Close();
                        f.Show();
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Example #2
0
        private void button11_Click(object sender, EventArgs e)
        {
            frm_Find_Transferring_From_To f = new frm_Find_Transferring_From_To();

            f.Show();
        }
Example #3
0
        private void editToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            frm_Find_Transferring_From_To f = new frm_Find_Transferring_From_To();

            f.Show();
        }