Tajriba ishi № 18
Mavzu: Mini loyihalar yaratish: dastur tuzish.
Ishni bajarishdan maqsad: Visual Studio 2012 muhitida C++ dasturlash tilida mobil aloqa kompaniyalari mijozlariga hizmat ko’rsatish dasturini yaratish .
Nazariy qism:
Mabil aloqa kompaniyalarida mijozlarga xizmat ko’rsatish qudagi turlardan iborat
1.Tariflar bilan ishlash , qulay tariflarni tanlash , tariflar qo’shish va tariflarni o’chirsh mumkin.
2. Internet paketlarini tanlash va ularga o’zgartirishlar kiritish.
3.Administrator bo’limini yaratish(1 - rasm).
1-rasm . Form oynasi
18 – lobaratoriya ishida internet paketlar bo’limini shakillantiramiz.
Internet paketlar bo’limi operator va mijozlarga xizmat qiladi.
Dastlab form mihozlar uchun xizmat qiladi . Agar login va parol kiritilsa bu form operatorlar uchun xizmat qiladi.
Mijozlarning imkoniyatlari bir muncha cheklangan bo’ladi, faqat o’zlariga maqul Internet to’plamini tanlab biladilar.
1-rasm.Mijozlar uchun
Login va parol kiritilsa unda formda o’zgarishlar yuz beradi.
2 – rasm . Operator uchun
Operatorlar internet to’plamini qo’shib bilishi mumkin.
Yuklash tugmasi bosilsa yangi to’plam qo’shiladi.
//Paket bo’limi kodi
#pragma endregion
private: System::Void listView1_SelectedIndexChanged(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void Paket_Load(System::Object^ sender, System::EventArgs^ e) {
Paket ^ F = gcnew Paket;
if(ok)
this->Width = 875;
oleDbDataAdapter1->Fill(dataSet1);
oleDbDataAdapter2->Fill(dataSet1);
oleDbDataAdapter3->Fill(dataSet1);
}
private: System::Void dataGridView1_CellContentClick(System::Object^ sender, System::Windows::Forms::DataGridViewCellEventArgs^ e) {
}
private: System::Void tabPage1_Click(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void button1_Click_1(System::Object^ sender, System::EventArgs^ e) {
oleDbDataAdapter1 -> Update(dataSet1->Tables["Paket_kunlik"]);
}
private: System::Void groupBox1_Enter(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void textBox1_TextChanged(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void bindingNavigatorCountItem_Click(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void button5_Click(System::Object^ sender, System::EventArgs^ e) {
if(k1 -> Text != "" && k2 -> Text != "" && k3 -> Text != "" && k4 -> Text != "" && k5 -> Text != "")
{
dataSet1 -> Tables["Paket_kunlik"] -> Rows -> Add(k1 -> Text , k2 -> Text , k3 -> Text , k4 -> Text , k5 -> Text);
oleDbDataAdapter1 -> Update(dataSet1 -> Tables["Paket_kunlik"]);
k1 -> Text = "";
k2 -> Text = "";
k3 -> Text = "";
k4 -> Text = "";
k5 -> Text = "";
}
else
MessageBox::Show("Iltimos jadvalni to'ldiring");
}
private: System::Void button4_Click(System::Object^ sender, System::EventArgs^ e) {
if(h1 -> Text != "" && h2 -> Text != "" && h3 -> Text != "" && h4 -> Text != "" && h5 -> Text != "")
{
dataSet1 -> Tables["Paket_Haftalik"] -> Rows -> Add(h1 -> Text , h2 -> Text , h3 -> Text , h4 -> Text , h5 -> Text);
oleDbDataAdapter2 -> Update(dataSet1 -> Tables["Paket_Haftalik"]);
h1 -> Text = "" ;
h2 -> Text = "" ;
h3 -> Text = "" ;
h4 -> Text = "" ;
h5 -> Text = "" ;
}
else
MessageBox::Show("Iltimos jadvalni to'ldiring");
}
private: System::Void button3_Click(System::Object^ sender, System::EventArgs^ e) {
if(o1 -> Text != "" && o2 -> Text != "" && o3 -> Text != "" && o4 -> Text != "" )
{
dataSet1 -> Tables["Paket_oylik"] -> Rows -> Add(o1 -> Text , o2 -> Text , o3 -> Text , o4 -> Text);
oleDbDataAdapter3 -> Update(dataSet1 -> Tables["Paket_oylik"]);
o1 -> Text = "" ;
o2 -> Text = "" ;
o3 -> Text = "" ;
o4 -> Text = "" ;
}
else
MessageBox::Show("Iltimos jadvalni to'ldiring");
}
private: System::Void button6_Click(System::Object^ sender, System::EventArgs^ e) {
oleDbDataAdapter1 -> Update(dataSet1 -> Tables["Paket_kunlik"]);
MessageBox::Show("Saqlash bajarildi");
}
private: System::Void button2_Click(System::Object^ sender, System::EventArgs^ e) {
oleDbDataAdapter2 -> Update(dataSet1 -> Tables["Paket_Haftalik"]);
MessageBox::Show("Saqlash bajarildi");
}
private: System::Void button1_Click_2(System::Object^ sender, System::EventArgs^ e) {
oleDbDataAdapter3 -> Update(dataSet1 -> Tables["Paket_oylik"]);
MessageBox::Show("Saqlash bajarildi");
}
private: System::Void bindingNavigator1_RefreshItems(System::Object^ sender, System::EventArgs^ e) { }
Do'stlaringiz bilan baham: |