Exemplo n.º 1
0
        private void newbtn_Click(object sender, EventArgs e)
        {
            this.Hide();
            addnewclientproductfilm myform = new addnewclientproductfilm(mEmployee, mAccount, mPermission);

            myform.Show();
            this.Close();
        }
Exemplo n.º 2
0
        private void savebtn_Click(object sender, EventArgs e)
        {
            bool   can_save_or_not = true;
            double testnumber      = 0;

            if (string.IsNullOrWhiteSpace(filenametextbox))
            {
                can_save_or_not = false;
            }
            else if (string.IsNullOrWhiteSpace(film_length_text_box.Text))
            {
                can_save_or_not = false;
            }
            else if (string.IsNullOrWhiteSpace(film_width_text_box.Text))
            {
                can_save_or_not = false;
            }
            else if (myproducts.Count == 0)
            {
                can_save_or_not = false;
            }
            else if (!double.TryParse(film_length_text_box.Text, out testnumber))
            {
                can_save_or_not = false;
            }
            else if (!double.TryParse(film_width_text_box.Text, out testnumber))
            {
                can_save_or_not = false;
            }

            if (can_save_or_not)
            {
                //can save
                savenewpermssionnumber();
                long mydata = savefilmdataheader();
                savefileclientfilmproducts(mydata);
                MessageBox.Show("تم الحفظ", "معلومات", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1, MessageBoxOptions.RtlReading);
                this.Hide();
                addnewclientproductfilm myform = new addnewclientproductfilm(mEmployee, mAccount, mPermission);
                myform.Show();
                this.Close();
            }
            else
            {
                MessageBox.Show("لا يمكن الحفظ لعدم إكتمال البيانات ", "خطأ", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, MessageBoxOptions.RtlReading);
            }
        }
Exemplo n.º 3
0
        private void إضافةفيلمجديدToolStripMenuItem_Click(object sender, EventArgs e)
        {
            addnewclientproductfilm myform = new addnewclientproductfilm(mEmployee, mAccount, mPermission);

            myform.Show();
        }