-
المساهمات
307 -
تاريخ الانضمام
-
تاريخ آخر زيارة
-
عدد الأيام التي تصدر بها
1
نوع المحتوى
ريادة الأعمال
البرمجة
التصميم
DevOps
التسويق والمبيعات
العمل الحر
البرامج والتطبيقات
آخر التحديثات
قصص نجاح
أسئلة وأجوبة
كتب
دورات
كل منشورات العضو ايمن ميلاد
-
انطفي جهاز الان عن نسبة شاحن 38%
-
لا عند تشغيله تظهر نسبة الشحن التي اقفل عليه ولايعمل الي من خلال الشاحن بعد قفل مفاجئ
-
امس شهدت مقطع نفسه 5% 5% الذي قلته انته اخي محمد 5% لم يتغير الان جربت امر اخي مصطفي في انتظار ماذا يحدث
-
- 15 اجابة
-
- 1
-
-
ماذا افعل بعد تنفيد امر powercfg -restoredefaultschemes هل استخدم جهاز بدون شحن لاعرف هل ينطفي او لا
- 15 اجابة
-
- 1
-
-
السلام عليكم ورحمة الله وبركاته لدي جهاز msigf63 عندما يصل شحن 45% ينطفي لكن عندما يكون في شحن لا ينطفي غيريت بطارية لاب توب ونظفت مرواحه وغيرت معجون لازالت نفس مشكلة ما الحل للعلم لازال صوت مروحه مستمر
- 15 اجابة
-
- 2
-
-
اخ محمد عاطف قام بحل مشكلة نحن في انتظار شرح منه ماهي
-
اخي محمد بعد حل مشكلة ممكن تكتب خطوات بالضبط عشان كل يستفيذ بارك الله فيك
-
تقصد هكدا Route::post('Department', [DepartmentController::class, 'store'])->name('Department.store'); public function store(Request $request) { $department = new Department(); $department->Name_dept = $request->input('name'); $department->save(); return redirect()->route('Department.index'); } <form action="{{ route('Department.index') }}" method="post"> @csrf <div class="form-group"> <label for="name">اسم القسم</label> <input type="text" name="name" id="name" class="form-control"> </div> <div class="form-group"> <button type="submit" class="btn btn-primary">حفظ</button> </div> </form> تظهر مشكلة لازالت
- 10 اجابة
-
- 1
-
-
يعني تقصد form تصبح هكذا <form action="{{ route('Department.store') }}" method="post"> @csrf <div class="form-group"> <label for="Name_dept">اسم القسم</label> <input type="text" name="Name_dept" id="Name_dept" class="form-control"> </div> <div class="form-group"> <button type="submit" class="btn btn-primary">حفظ</button> </div> </form> وكود حفظ يصبح هكدا public function store(Request $request) { $department = new Department(); $department->Name_dept = $request->input('name'); $department->save(); echo "تم حفظ "; }
- 10 اجابة
-
- 1
-
-
السلام عليكم عندما اضغط علي زر حفظ تظهر صفحة PAGE EXPIRED اكواد المستخدمة لدي <?php namespace App\Http\Controllers; use App\Models\Department; use Illuminate\Http\Request; class DepartmentController extends Controller { public function index() { $departments = Department::all(); return view('Department.index', compact('departments')); } public function show() {} public function create() { return view('Department.create'); } public function store(Request $request) { $department = new Department(); $department->Name_dept = $request->input('name'); $department->save(); return redirect()->route('Department.index'); } public function edit($id) { return view('Department.edit'); } public function update($id) {} public function destroy($id) {} } <?php namespace App\Models; use Illuminate\Database\Eloquent\Model; class Department extends Model { protected $fillable=[ 'Name_dept', ] ; } @extends('layouts.master') @section('title') الاقسام @stop @section('css') <style> .form-group { display: flex; flex-direction: column; align-items: center; margin-top: 20px; } #name { width: 50%; } </style> @stop @section('title_page1') الاقسام @stop @section('title_page2') اضافة قسم @stop @section('content') <form action="{{ route('Department.index') }}" method="post"> @csrf <div class="form-group"> <label for="name">اسم القسم</label> <input type="text" name="name" id="name" class="form-control"> </div> <div class="form-group"> <button type="submit" class="btn btn-primary">حفظ</button> </div> </form> @stop @section('scripts') @stop @extends('layouts.master'); @section('title') الاقسام @stop @section('css') @stop @section('title_page1') لوحة التحكم @stop @section('title_page2') الأقسام @stop @section('content') <div class="box"> <div class="box-header"> <h4> <a href="/Department/create">إضافة قسم</a></h4> </div> <!-- /.box-header --> <div class="box-body no-padding"> <table class="table direction table-striped"> <th>#</th> <th>اسم القسم</th> <th>تاريخ الانشاء</th> @foreach ($departments as $index => $department) <tr> <td>{{ $department->id_dept }}</td> {{-- <td>{{ $department->Name_dept }}</td> --}} <td><a href="/department/<?= $department->id_dept ?>"><?= $department->Name_dept ?></a></td> <td>{{ $department->created_at }}</td> </tr> @endforeach </table> </div> <!-- /.box-body --> </div> @endsection @section('scripts') @stop ممكن حل مشكلة
- 10 اجابة
-
- 1
-
-
لزالت تظهر صفحةاثناء حفظ بيانات
-
لازالت نفس مشكلة <?php use App\Http\Controllers\DepartmentController; use Illuminate\Support\Facades\Route; Route::get('/', function () { return view('welcome'); })->name('/'); Route::get('/Department', [DepartmentController::class, 'index'])->name('Department'); Route::get('Department/create', [DepartmentController::class, 'create']); Route::get('Department/{id}', [DepartmentController::class, 'show']); Route::post('Department', [DepartmentController::class, 'store']); Route::get('Department/{id}/edit', [DepartmentController::class, 'edit']); Route::put('Department/{id}', [DepartmentController::class, 'update']); Route::delete('Department/{id}', [DepartmentController::class, 'destroy']); للعلم مجلد وداخله صفحة index <?php namespace App\Http\Controllers; use App\Models\Department; use Illuminate\Http\Request; class DepartmentController extends Controller { public function index() { $departments = Department::all(); return view('department.index', compact('departments')); } public function show() {} public function create() { return view('department.create'); } public function store(Request $request) { $department = new Department(); $department->Name_dept = $request->input('name'); $department->save(); return redirect()->route('Department.index'); } public function edit($id) { return view('department.edit'); } public function update($id) {} public function destroy($id) {} } @extends('layouts.master') @section('title') الاقسام @stop @section('css') <style> .form-group { display: flex; flex-direction: column; align-items: center; margin-top: 20px; } #name { width: 50%; } </style> @stop @section('title_page1') الاقسام @stop @section('title_page2') اضافة قسم @stop @section('content') <form action="/Department" method="post"> @csrf <div class="form-group"> <label for="name">اسم القسم</label> <input type="text" name="name" id="name" class="form-control"> </div> <div class="form-group"> <button class="btn btn-primary">حفظ</button> </div> </form> @stop @section('scripts') @stop
-
لازالت تظهر مشكلة <?php use App\Http\Controllers\DepartmentController; use Illuminate\Support\Facades\Route; Route::get('/', function () { return view('welcome'); })->name('/'); Route::get('/Department', [DepartmentController::class, 'index'])->name('Department'); Route::get('Department/create', [DepartmentController::class, 'create']); Route::get('Department/{id}', [DepartmentController::class, 'show']); Route::post('Department', [DepartmentController::class, 'store']); Route::get('Department/{id}/edit', [DepartmentController::class, 'edit']); Route::put('Department/{id}', [DepartmentController::class, 'update']); Route::delete('Department/{id}', [DepartmentController::class, 'destroy']); <?php namespace App\Http\Controllers; use App\Models\Department; use Illuminate\Http\Request; class DepartmentController extends Controller { public function index() { $departments = Department::all(); $deptcount=Department::count(); return view('department.index', compact('departments','deptcount')); } public function show() {} public function create() { return view('department.create'); } public function store(Request $request) { $department = new Department(); $department->Name_dept = $request->input('name'); $department->save(); return redirect()->route('Departments.index'); } public function edit($id) { return view('department.edit'); } public function update($id) {} public function destroy($id) {} } @extends('layouts.master') @section('title') الاقسام @stop @section('css') <style> .form-group { display: flex; flex-direction: column; align-items: center; margin-top: 20px; } #name { width: 50%; } </style> @stop @section('title_page1') الاقسام @stop @section('title_page2') اضافة قسم @stop @section('content') <form action="/Department" method="post"> @csrf <div class="form-group"> <label for="name">اسم القسم</label> <input type="text" name="name" id="name" class="form-control"> </div> <div class="form-group"> <button class="btn btn-primary">حفظ</button> </div> </form> @stop @section('scripts') @stop
- 16 اجابة
-
- 1
-
-
لماذا عندما ازور صفحة تظهر Page Expired @extends('layouts.master') @section('title') الاقسام @stop @section('css') <head> <meta name="csrf-token" content="{{csrf_token()}}"> </head> <style> .form-group { display: flex; flex-direction: column; align-items: center; margin-top: } #name { width: 50%; } </style> @stop @section('title_page1') الاقسام @stop @section('title_page2') اضافة قسم @stop @section('content') <form action="/Department" method="post"> <input type="hidden" name="_token" value="{{csrf_token()}}"> <div class="form-group"> <label for="name">اسم القسم</label> <input type="text" name="name" id="name" class="form-control"> </div> <div class="form-group"> <button class="btn btn-primary">حفظ</button> </div> </form> @stop @section('scripts') @stop public function store(Request $request) { $department = new Department(); $department->Name_dept = $request->input('name'); $department->save(); return redirect(); } ممكن حل مشكلة
- 16 اجابة
-
- 1
-
-
السلام عليكم لدي مشكلة اثناء زيارة صفحة تظهر فارغة Route::get('Department', [DepartmentController::class, 'index'])->name('Department'); Route::get('Department/create', [DepartmentController::class, 'create']); Route::get('Department/{id}', [DepartmentController::class, 'show']); Route::post('Department', [DepartmentController::class, 'store']); Route::get('Department/{id}/edit', [DepartmentController::class, 'edit']); Route::put('Department/{id}',[DepartmentController::class, 'update']); Route::delete('Department/{id}',[DepartmentController::class, 'destroy']); كود صفحة index @extends('layouts.master'); @section('title') الاقسام @stop @section('css') @stop @section('title_page1') لوحة التحكم @stop @section('title_page2') الأقسام @stop @section('content') <div class="box"> <div class="box-header"> <h4> <a href="/department/create">إضافة قسم</a></h4> </div> <!-- /.box-header --> <div class="box-body no-padding"> <table class="table direction table-striped"> <th>#</th> <th>اسم القسم</th> <th>تاريخ الانشاء</th> @foreach ($departments as $index => $department) <tr> <td>{{ $department->id_dept }}</td> {{-- <td>{{ $department->Name_dept }}</td> --}} <td><a href="/department/<?=$department->id_dept ?>"><?=$department->Name_dept ?></a></td> <td>{{ $department->created_at }}</td> </tr> @endforeach </table> </div> <!-- /.box-body --> </div> @endsection @section('scripts') @stop دوال داخل controller <?php namespace App\Http\Controllers; use App\Models\Department; use Illuminate\Http\Request; class DepartmentController extends Controller { public function index() { $departments = Department::all(); return view('department.index', compact('departments')); } public function show() { } public function create() { return view ('department.create'); } public function store() { } public function edit($id) { return view ('department.edit'); } public function update($id) { } public function destroy($id) { } } صفحة create @extends('layouts.master'); @section('title') الاقسام @stop @section('css') @stop @section('title_page1') الاقسام @stop @section('title_page2') اضافة قسم @stop @section('content') <form action="/Department" method="post"> <div class="form-group"> <label for="name">اسم القسم</label> <input type="text" name="name" id="name" class="form-control"> </div> <div class="form-group"> <button class="btn btn-primary">حفظ</button> </div> </form> @stop @section('scripts') @stop لماذا عندما ازور صفحة create يظهر 404
- 16 اجابة
-
- 2
-
-
لماذا اثناء تحديث فاتورة يضيف اعمدة جديدة في داتا قريد فيو كما موضح في صورة ولا يضفيه اسفل عناصر مرفق كود if (e.KeyCode == Keys.Enter) { // التحقق من وجود الصنف مسبقًا for (int i = 0; i < dataGridView1.Rows.Count - 1; i++) { if (dataGridView1.Rows[i].Cells[0].Value.ToString()==itemcode.Text ) { MessageBox.Show("اسم الصنف موجود مسبقا", "تنبيه", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } } CalculateTotal(); // التحقق مما إذا كانت الأعمدة موجودة بالفعل قبل إضافتها // التأكد من أن الجدول يحتوي على الأعمدة المطلوبة if (!dt.Columns.Contains("رقم الصنف")) { dt.Columns.Add("رقم الصنف"); } if (!dt.Columns.Contains("اسم الصنف")) { dt.Columns.Add("اسم الصنف"); } if (!dt.Columns.Contains("السعر")) { dt.Columns.Add("السعر"); } if (!dt.Columns.Contains("الكمية")) { dt.Columns.Add("الكمية"); } if (!dt.Columns.Contains("الاجمالي")) { dt.Columns.Add("الاجمالي"); } // إنشاء صف جديد وإضافة البيانات DataRow r = dt.NewRow(); r["رقم الصنف"] = itemcode.Text; r["اسم الصنف"] = itemname.Text; r["السعر"] = price.Text; r["الكمية"] = qty.Text; r["الاجمالي"] = total_.Text; dt.Rows.Add(r); dataGridView1.DataSource = dt; }
-
مشكلة تكمن عند تعديل فاتورة بحيث اضيف صنف جديد يظهر اعمدة جديده في داتا قريد فيو معا اعمدة التي به اصناف سابقة if (e.KeyCode == Keys.Enter) { // التحقق من وجود الصنف مسبقًا for (int i = 0; i < dataGridView1.Rows.Count - 1; i++) { if (itemcode.Text == dataGridView1.Rows[i].Cells[0].Value.ToString()) { MessageBox.Show("اسم الصنف موجود مسبقا", "تنبيه", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } } CalculateTotal(); // التحقق مما إذا كانت الأعمدة موجودة بالفعل قبل إضافتها // التأكد من أن الجدول يحتوي على الأعمدة المطلوبة if (!dt.Columns.Contains("رقم الصنف")) { dt.Columns.Add("رقم الصنف"); } if (!dt.Columns.Contains("اسم الصنف")) { dt.Columns.Add("اسم الصنف"); } if (!dt.Columns.Contains("السعر")) { dt.Columns.Add("السعر"); } if (!dt.Columns.Contains("الكمية")) { dt.Columns.Add("الكمية"); } if (!dt.Columns.Contains("الاجمالي")) { dt.Columns.Add("الاجمالي"); } // إنشاء صف جديد وإضافة البيانات DataRow r = dt.NewRow(); r["رقم الصنف"] = itemcode.Text; r["اسم الصنف"] = itemname.Text; r["السعر"] = price.Text; r["الكمية"] = qty.Text; r["الاجمالي"] = total_.Text; dt.Rows.Add(r); dataGridView1.DataSource = dt;
-
السلام عليكم لدي كود تالي لتعديل بيانات في جدول فاتورة وتفاصيل فاتورة يتم تعديل بيانات في جدول فاتورة لكن تفاصيل فاتورة تظل اصناف كم هيا try { // تعريف المتغير للحصول على اسم المحل من عنصر التحكم string importerName = IMPORTERNAME.Text; // جملة الاستعلام باستخدام معلمة بدلاً من القيمة الثابتة string query = "SELECT IMPORTERNAME, SUM(DebtAmount) AS TotalDebt " + "FROM BUYBILL " + "WHERE IMPORTERNAME = @importerName AND DebtAmount > 0 " + "GROUP BY IMPORTERNAME"; // إنشاء SqlDataAdapter مع جملة الاستعلام والاتصال بقاعدة البيانات SqlDataAdapter a = new SqlDataAdapter(query, Class1.con); // إضافة المعلمة إلى SqlDataAdapter a.SelectCommand.Parameters.AddWithValue("@importerName", importerName); // إنشاء DataTable لملء البيانات المسترجعة DataTable d = new DataTable(); // ملء DataTable باستخدام SqlDataAdapter a.Fill(d); // عرض معلومات الدين if (d.Rows.Count > 0) { string tt = d.Rows[0]["TotalDebt"].ToString(); MessageBox.Show("دين المحل: " + tt); } // التحقق من اختيارات المستخدم if (IMPORTERNAME.SelectedIndex < 0) { MessageBox.Show("يرجى اختيار اسم الزبون", "تنبيه"); IMPORTERNAME.Select(); return; } if (BUYTYPE.SelectedIndex < 0) { MessageBox.Show("يرجى اختيار نوع الفاتورة", "تنبيه"); BUYTYPE.Select(); return; } if (dataGridView1.Rows.Count == 0) { MessageBox.Show("لا توجد أصناف لحفظها", "تنبيه"); return; } // التحقق من وجود الفاتورة DataTable dt = new DataTable(); SqlDataAdapter adp = new SqlDataAdapter("SELECT * FROM buybill WHERE buycode=@buycode", Class1.con); adp.SelectCommand.Parameters.AddWithValue("@buycode", BUYCODE.Text); adp.Fill(dt); if (dt.Rows.Count > 0) { // تحديث بيانات الفاتورة DataRow existingRow = dt.Rows[0]; existingRow["BUYTYPE"] = BUYTYPE.Text; existingRow["IMPORTERNAME"] = IMPORTERNAME.Text; existingRow["NOTES"] = NOTES.Text; existingRow["BUYDATE"] = BUYDATE.Value; existingRow["TOTAL"] = Convert.ToDecimal(total_.Text); existingRow["TOTAL_ARBIC"] = totalar.Text; existingRow["TOTALQTY"] = Convert.ToInt32(totalqty.Text); existingRow["DebtAmount"] = Convert.ToDecimal(total_.Text); SqlCommandBuilder save = new SqlCommandBuilder(adp); adp.Update(dt); // تحديث تفاصيل الفاتورة DataTable dtDetails = new DataTable(); SqlDataAdapter detailAdp = new SqlDataAdapter("SELECT * FROM BUY_DET WHERE BUYCODE=@buycode", Class1.con); detailAdp.SelectCommand.Parameters.AddWithValue("@buycode", BUYCODE.Text); detailAdp.Fill(dtDetails); // تحديث أو إضافة تفاصيل جديدة foreach (DataGridViewRow row in dataGridView1.Rows) { string itemCode = row.Cells[0].Value.ToString(); int qty = Convert.ToInt32(row.Cells[3].Value); // تحقق مما إذا كان العنصر موجود بالفعل في تفاصيل الفاتورة DataRow existingDetail = dtDetails.AsEnumerable() .FirstOrDefault(r => r.Field<string>("ITEMCODE") == itemCode); if (existingDetail != null) { // تحديث الكمية والسعر existingDetail["QTY"] = qty; existingDetail["PRICE"] = row.Cells[2].Value; existingDetail["TOTAL"] = Convert.ToDecimal(row.Cells[2].Value) * qty; } else { // إضافة تفاصيل جديدة DataRow newDetailRow = dtDetails.NewRow(); newDetailRow["BUYCODE"] = BUYCODE.Text; newDetailRow["ITEMCODE"] = itemCode; newDetailRow["ITEMNAME"] = row.Cells[1].Value; newDetailRow["PRICE"] = row.Cells[2].Value; newDetailRow["QTY"] = qty; newDetailRow["TOTAL"] = Convert.ToDecimal(row.Cells[2].Value) * qty; dtDetails.Rows.Add(newDetailRow); } UpdateItemQuantity(itemCode, qty); } SqlCommandBuilder detailCmd = new SqlCommandBuilder(detailAdp); detailAdp.Update(dtDetails); MessageBox.Show("تم تعديل بيانات الفاتورة بنجاح وتحديث كمية في المخزن", "رسالة تأكيد", MessageBoxButtons.OK, MessageBoxIcon.Information); button1_Click(null, null); } } catch (Exception ex) { MessageBox.Show(ex.Message); }
-
ظهرت البيانات الان لماذا عندما اعدل فاتورة لكي اضيف صنف جديد لها يتم اضافة اعمدة جديدة لداتا قريد فيو try { // تعريف المتغير للحصول على اسم المحل من عنصر التحكم DialogResult result = MessageBox.Show("هل أنت متأكد من أنك تريد تعديل البيانات؟", "تأكيد التعديل", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if ((result == DialogResult.Yes)) { if (BUYTYPE.SelectedIndex < 0) { MessageBox.Show("يرجي اختيار نوع الفاتورة", "تنبيه"); BUYTYPE.Select(); return; } if (dataGridView1.Rows.Count == 0) { MessageBox.Show("لاتوجد أصناف لتعدليها ", "تنبيه"); return; } DataTable dt = new DataTable(); SqlDataAdapter adp = new SqlDataAdapter("select *from buybill where buycode='" + BUYCODE.Text + "'", Class1.con); adp.Fill(dt); if (dt.Rows.Count == 0) { int code = Class1.CODE_GENE("BUYBILL", "ID") + 1; BUYCODE.Text = code.ToString(); } else { DataRow dr = dt.Rows[0]; dr["BUYCODE"] = BUYCODE.Text; dr["BUYTYPE"] = BUYTYPE.Text; dr["IMPORTERNAME"] = IMPORTERNAME.Text; dr["NOTES"] = NOTES.Text; dr["BUYDATE"] = BUYDATE.Value; dr["TOTAL"] = Convert.ToDecimal(total_.Text); dr["TOTAL_ARBIC"] = totalar.Text; dr["TOTALQTY"] = Convert.ToInt32(totalqty.Text); dr["DebtAmount"] = Convert.ToDecimal(total_.Text); dt.Rows.Add(dr); SqlCommandBuilder save = new SqlCommandBuilder(adp); adp.Update(dt); SqlCommand cmd_del = new SqlCommand(); cmd_del.Connection = Class1.con; cmd_del.CommandText = "DELETE FROM BUY_DET WHERE BUYCODE ='" + BUYCODE.Text + "'"; cmd_del.ExecuteNonQuery(); DataTable dtDetails = new DataTable(); adp = new SqlDataAdapter("SELECT *FROM BUY_DET", Class1.con); adp.Fill(dtDetails); if (dataGridView1.Columns.Count == 0) { dataGridView1.Columns.Add("ITEMCODE", "كود الصنف"); dataGridView1.Columns.Add("ITEMNAME", "اسم الصنف"); dataGridView1.Columns.Add("PRICE", "السعر"); dataGridView1.Columns.Add("QTY", "الكمية"); dataGridView1.Columns.Add("TOTAL", "الإجمالي"); } dataGridView1.Rows.Clear(); for (int i = 0; i < dataGridView1.Rows.Count; i++) { DataRow dr_ = dtDetails.NewRow(); dr_["BUYCODE"] = BUYCODE.Text; dr_["ITEMCODE"] = dataGridView1.Rows[i].Cells[0].Value; dr_["ITEMNAME"] = dataGridView1.Rows[i].Cells[1].Value; dr_["PRICE"] = dataGridView1.Rows[i].Cells[2].Value; //dr_["TOTAL"] = total_.Text; dr_["QTY"] = dataGridView1.Rows[i].Cells[3].Value; dtDetails.Rows.Add(dr_); dr_["TOTAL"] = Convert.ToDecimal(dataGridView1.Rows[i].Cells[2].Value) * Convert.ToDecimal(dataGridView1.Rows[i].Cells[3].Value); string itemCode = dataGridView1.Rows[i].Cells[0].Value.ToString(); int qty = Convert.ToInt32(dataGridView1.Rows[i].Cells[3].Value); UpdateItemQuantity(itemCode, qty); } SqlCommandBuilder cmd_ = new SqlCommandBuilder(adp); adp.Update(dtDetails); MessageBox.Show(" تم حفظ تعديل بيانات فاتورة بنجاح وتحديث كمية في المخزن ", "رسالة تأكيد", MessageBoxButtons.OK, MessageBoxIcon.Information); button1_Click(null, null); } } } catch (Exception ex) { MessageBox.Show(ex.Message); }