Ejemplo n.º 1
0
        private void bunifuThinButton21_Click(object sender, EventArgs e)
        {
            //ADDCAT
            if (state == "CAT")
            {
                PL.FRM_ADDCAT FCAT = new FRM_ADDCAT();
                FCAT.btnadd.ButtonText = "اضافة";

                FCAT.ID = 0;
                bunifuTransition1.ShowSync(FCAT);
            }
            if (state == "BOOKS")
            {
                PL.FRM_ADDBOOKS fbooks = new FRM_ADDBOOKS();
                fbooks.btnadd.ButtonText = "اضافة";
                fbooks.ID = 0;
                bunifuTransition1.ShowSync(fbooks);
            }
            if (state == "ST")
            {
                PL.FRM_ADDSTUDINT fsell = new FRM_ADDSTUDINT();
                fsell.btnadd.ButtonText = "اضافة";
                fsell.ID = 0;
                bunifuTransition1.ShowSync(fsell);
            }
            if (state == "SELL")
            {
                PL.FRM_MAKESELL fst = new FRM_MAKESELL();
                fst.btnadd.ButtonText = "اضافة";
                fst.ID = 0;
                bunifuTransition1.ShowSync(fst);
            }
            if (state == "BRO")
            {
                PL.FRM_BRO fBR = new FRM_BRO();
                fBR.btnadd.ButtonText = "اضافة";
                fBR.ID = 0;
                bunifuTransition1.ShowSync(fBR);
            }
            if (state == "USER")
            {
                PL.FRM_ADDUSER fuser = new FRM_ADDUSER();
                fuser.btnadd.ButtonText = "اضافة";
                fuser.ID = 0;
                bunifuTransition1.ShowSync(fuser);
            }
        }
Ejemplo n.º 2
0
        private void bunifuThinButton23_Click(object sender, EventArgs e)
        {
            if (state == "CAT")
            {
                PL.FRM_ADDCAT FCAT = new FRM_ADDCAT();
                FCAT.btnadd.ButtonText = "تعديل";
                FCAT.txt_catname.Text  = Convert.ToString(dataGridView1.CurrentRow.Cells[1].Value);

                FCAT.ID = Convert.ToInt16(dataGridView1.CurrentRow.Cells[0].Value);
                bunifuTransition1.ShowSync(FCAT);
            }
            else if (state == "BOOKS")
            {
                PL.FRM_ADDBOOKS Fbooks = new FRM_ADDBOOKS();
                Fbooks.btnadd.ButtonText = "تعديل";

                Fbooks.ID = Convert.ToInt16(dataGridView1.CurrentRow.Cells[0].Value);
                DataTable dt = new DataTable();
                dt = BLBOOKS.LOADEDIT(Convert.ToInt16(dataGridView1.CurrentRow.Cells[0].Value));
                object obj1 = dt.Rows[0]["TITLE"];
                object obj2 = dt.Rows[0]["AUTHER"];
                object obj3 = dt.Rows[0]["CAT"];
                object obj4 = dt.Rows[0]["PRICE"];
                object obj5 = dt.Rows[0]["RATE"];
                object obj6 = dt.Rows[0]["COVER"];
                Fbooks.txt_title.Text  = obj1.ToString();
                Fbooks.txt_auther.Text = obj2.ToString();
                Fbooks.comboBox1.Text  = obj3.ToString();
                Fbooks.txt_price.Text  = obj4.ToString();
                Fbooks.txt_rate.Value  = (int)obj5;
                Byte[]       ob = (Byte[])obj6;
                MemoryStream ma = new MemoryStream(ob);
                Fbooks.cover.Image = Image.FromStream(ma);
                bunifuTransition1.ShowSync(Fbooks);
            }
            else if (state == "ST")
            {
                PL.FRM_ADDSTUDINT Fst = new FRM_ADDSTUDINT();
                Fst.btnadd.ButtonText = "تعديل";

                Fst.ID = Convert.ToInt16(dataGridView1.CurrentRow.Cells[0].Value);
                DataTable dt = new DataTable();
                dt = BLST.LOADEDIT(Convert.ToInt16(dataGridView1.CurrentRow.Cells[0].Value));
                object obj1 = dt.Rows[0]["NAME"];
                object obj2 = dt.Rows[0]["TLOCATION"];
                object obj3 = dt.Rows[0]["PHONE"];
                object obj4 = dt.Rows[0]["EMAIL"];
                object obj5 = dt.Rows[0]["SCHOOL"];
                object obj6 = dt.Rows[0]["DEP"];
                object obj7 = dt.Rows[0]["COVER"];
                Fst.txt_name.Text     = obj1.ToString();
                Fst.txt_location.Text = obj2.ToString();
                Fst.txt_phone.Text    = obj3.ToString();
                Fst.txt_email.Text    = obj4.ToString();
                Fst.txt_school.Text   = obj5.ToString();
                Fst.txt_dep.Text      = obj6.ToString();
                Byte[]       ob = (Byte[])obj7;
                MemoryStream ma = new MemoryStream(ob);
                Fst.cover.Image = Image.FromStream(ma);
                bunifuTransition1.ShowSync(Fst);
            }
            else if (state == "SELL")
            {
                PL.FRM_MAKESELL Fsell = new FRM_MAKESELL();
                Fsell.btnadd.ButtonText = "تعديل";

                Fsell.ID = Convert.ToInt16(dataGridView1.CurrentRow.Cells[0].Value);
                DataTable dt = new DataTable();


                bunifuTransition1.ShowSync(Fsell);
            }
            else if (state == "BRO")
            {
                PL.FRM_BRO Fbro = new FRM_BRO();
                Fbro.btnadd.ButtonText = "تعديل";

                Fbro.ID = Convert.ToInt16(dataGridView1.CurrentRow.Cells[0].Value);
                DataTable dt = new DataTable();


                bunifuTransition1.ShowSync(Fbro);
            }
            else if (state == "USER")
            {
                PL.FRM_ADDUSER Fuser = new FRM_ADDUSER();
                Fuser.btnadd.ButtonText = "تعديل";

                Fuser.ID = Convert.ToInt16(dataGridView1.CurrentRow.Cells[0].Value);
                DataTable dt = new DataTable();



                bunifuTransition1.ShowSync(Fuser);
            }
        }