الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

مبدئ في البرمجه

بدأه hob_000 في 2 نوفمبر 2008 · 7 رد · 557 مشاهدة · في Microsoft Visual C#.NET
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

بســم الله الـرحمــن الرحيــم

انا جديد بالمنتدى ويا ليت اقدر افيدكم وتفيدوني

انا عندي مشــــــروع في الكليه

وطلبي ســـهل مره

ابي شاااشات جاهزه

اخذ الصوره وانقلها للبرنامج واكتب عليــــــــها او اضيف ازرار واكواد او ما شااااابه

دورت لين دخت :S بقوقل ما حصلت

الي عنده ويقدر يفيدني

............................................................

ومطلوب علي اكواااااااد للبرنامج #c

اكواد عاديه يعني

خروج من البرنامج

فتح نافذه جديد

تعديل حذف اضافه

وشكـــــــــرا لكم مقدما

#2

Windows Application ?!!!

#3

اخي وضح اكثر

هل تريد برنامج ابكليشن مع داتا بيز

ما هو نوع الداتا

برنامج يخص شركة مؤسسة ؟

زر اضافه تعديل حذف بحث

عرض البيانات text او dataGV

؟

تم تعديل هذه المشاركة بواسطة fota.live في 2 نوفمبر 2008 في 22:52

FOTA KHader FAR

سوف اتجة الى عالم الويب

thumb_kujviv1t1.jpg

#4

نعم اخوي برامج بدون داتا وبدون الفراغات ولا الازرار انا اللي اضيفها من البرنامج

برنامج يخص شــوؤن الموظفين

الاكواد المطلوبه

كود اضافه

كود تعديل

كود بحث

كود حذف

...............

يعرض البيانات من الداتا

#5

السلام لكم

اخي هاد زر الاضافه

مثال على زر الاضافه و اي اشي بالكود مش فاهمو احكي عشان اشرحلك ايه

 oneDataSet.EMPRow row = FormComputer.DS.EMP.NewEMPRow();

 		   if (this.txt_ide.Text == "" || this.txt_email.Text == ""
 			   || this.txt_old.Text == "" || this.txt_phone.Text == ""
 			   || this.txt_salry.Text == "" || this.txt_address.Text == "")
 			   MessageBox.Show("الرجاء اكمل باقي ادخال المعلومات ");

 		   else
 		   {

 			   try
 			   {
 				   row.name_emp = comboBox1.Text;
 				   row.address_emp = txt_address.Text;
 				   row.email_emp = txt_email.Text;
 				   row.old_emp = int.Parse(txt_old.Text);
 				   row.ide_emp = int.Parse(txt_ide.Text);
 				   row.phone_emp = int.Parse(txt_phone.Text);
 				   if (!string.IsNullOrEmpty(txt_salry.Text))
 				   {
 					   row.salery_emp = decimal.Parse(txt_salry.Text);
 				   }


 				   FormComputer.DS.EMP.AddEMPRow(row);
 				   adapter.Update(FormComputer.DS.EMP);

 				   MessageBox.Show("تم اضافة سجل جديد في نجاح شكرا لك!!! !", "computer", MessageBoxButtons.OK, MessageBoxIcon.Information);
 			   }

 			   catch (Exception ex)
 			   {
 				   MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
 			   }

مثال على زر التعديل

 		   try
 		   {
 			   for (int i = 0; i < FormComputer.DS.EMP.Rows.Count; i++)
 			   {
 				   string id = FormComputer.DS.EMP[1].ToString();
 				   if (string.Equals(FormComputer.DS.EMP[1].ToString(), comboBox1.Text))
 				   {

 					   oneDataSet.EMPRow row = FormComputer.DS.EMP;
 					   MessageBox.Show("يجب عليك تعديل بعض الخانات اذا اردت التعديل ");

 					   row.BeginEdit();
 					   row.name_emp = comboBox1.Text;
 					   row.address_emp = (txt_address.Text);
 					   row.email_emp = (txt_email.Text);
 					   row.old_emp = int.Parse(txt_old.Text);
 					   row.ide_emp = int.Parse(txt_ide.Text);
 					   row.phone_emp = int.Parse(txt_phone.Text);
 					   if (!string.IsNullOrEmpty(txt_salry.Text))
 					   {
 						   row.salery_emp = decimal.Parse(txt_salry.Text);
 					   }
 					   row.ide_emp = int.Parse(txt_ide.Text);
 					   adapter.Update(FormComputer.DS.EMP);
 					   row.EndEdit();
 					   adapter.Update(FormComputer.DS.EMP);
 					   MessageBox.Show("تم التعديل في نجاح !", "computer", MessageBoxButtons.OK, MessageBoxIcon.Information);
 					   break;
 				   }
 			   }
 		   }
 		   catch (Exception ex)
 		   {
 			   MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
 		   }

مثال على زر الحذف

 bool isOK = false;
 		   for (int i = 0; i < FormComputer.DS.EMP.Rows.Count; i++)
 		   {
 			   if (string.Equals(FormComputer.DS.EMP[1].ToString(), comboBox1.Text))
 			   {
 				   try
 				   {

 					   //adapter.Delete(FormComputer.DS.EMP);
 					   FormComputer.DS.EMP.RemoveEMPRow(FormComputer.DS.EMP);
 					   //adapter.Update(UO.DS.Employees);
 					   isOK = true;
 					   break;
 				   }
 				   catch (Exception ex)
 				   {
 					   isOK = false;
 					   MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
 				   }
 			   }
 		   }

 		   if (isOK)
 		   {
 			   MessageBox.Show("Success !", "Unit One", MessageBoxButtons.OK, MessageBoxIcon.Information);
 		   }
 		   else
 		   {
 			   MessageBox.Show("Employee was not found !", "Unit One", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
 		   }

كود زر الحفظ

  bool empExists = false;
 		   int empIndex = -1;
 		   oneDataSet.EMPRow row;


 		   if (!ValidateName()) { return; };

 		   //checking if the employee exists
 		   //for (int i = 0; i < UO.DS.Employees)
 		   for (int i = 0; i < FormComputer.DS.EMP.Rows.Count; i++)
 		   {
 			   if (string.Equals(FormComputer.DS.EMP[1].ToString(), comboBox1.Text))
 			   {
 				   empExists = true;
 				   empIndex = i;
 				   break;
 			   }
 		   }

 		   if (empExists)
 		   {
 			   row = FormComputer.DS.EMP[empIndex];

 			   row.BeginEdit();
 			   row.name_emp = comboBox1.Text;
 			   row.address_emp = (txt_address.Text);
 			   row.email_emp = (txt_email.Text);
 			   row.old_emp = int.Parse(txt_old.Text);
 			   row.ide_emp = int.Parse(txt_ide.Text);
 			   row.phone_emp = int.Parse(txt_phone.Text);
 			   if (!string.IsNullOrEmpty(txt_salry.Text))
 			   {
 				   row.salery_emp = decimal.Parse(txt_salry.Text);
 			   }
 			   row.ide_emp = int.Parse(txt_ide.Text);
 			   row.EndEdit();

 		   }
 		   else
 		   {
 			   row = FormComputer.DS.EMP.NewEMPRow();

 			   row.BeginEdit();
 			   row.name_emp = comboBox1.Text;
 			   row.address_emp = (txt_address.Text);
 			   row.email_emp = (txt_email.Text);
 			   row.old_emp = int.Parse(txt_old.Text);
 			   row.ide_emp = int.Parse(txt_ide.Text);
 			   row.phone_emp = int.Parse(txt_phone.Text);
 			   if (!string.IsNullOrEmpty(txt_salry.Text))
 			   {
 				   row.salery_emp = decimal.Parse(txt_salry.Text);
 			   }
 			   row.ide_emp = int.Parse(txt_ide.Text);
 			   row.EndEdit();

 			   FormComputer.DS.EMP.AddEMPRow(row);
 		   }



 		   try
 		   {
 			   adapter.Update(FormComputer.DS.EMP);
 			   MessageBox.Show("Success !", "Unit One", MessageBoxButtons.OK, MessageBoxIcon.Information);
 		   }
 		   catch (Exception ex)
 		   {
 			   MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
 		   }

FOTA KHader FAR

سوف اتجة الى عالم الويب

thumb_kujviv1t1.jpg

#6

يعطيك العـــــــــافيه اخوي

اذا عندك كود فتح نافذه جديده

يعني عندي شاشتين اشغل البرنامج واختار الشاشة الثانيه ينتقل عليــــــــــــــها

محتااااااج هذا الكود

انا اخذته بس يجي فيه خطاء ما ادري ايش السبب

وهو

متغــير + اسم الشاشة المراد فتحها=new + اسم الشاشة ();

متغيــر . show();

لكنه يعطي اخطاء في اسم الشاشة ما ادري ايش السبب

اذا تعرف كود يقوم بنفس المهم انا شاكر لك

#7
Form2 x = new Form2();
 x.ShowDialog();

تم تعديل هذه المشاركة بواسطة fota.live في 4 نوفمبر 2008 في 01:06

FOTA KHader FAR

سوف اتجة الى عالم الويب

thumb_kujviv1t1.jpg

#8

سلـــــــــــمت يدأأأأأأأأأك

والله يزيدك من علمــــــــه

مواضيع مشابهة