ID Class Add View Update Delete 1 Class1 1 2 Class2 1 3 Class3 1 4 Class4
String fastFollowAssetPackPath = getAbsoluteAssetPath(assetPackName, ""); if (fastFollowAssetPackPath == null) { assetPackManager.registerListener(assetPackStateUpdateListener); List<String> assetPackList = new ArrayList<>(); assetPackList.add(assetPackName); assetPackManager.fetch(assetPackList); }
$("#classid").change(function(){ var sessionid = $("#sessionid").val(); var classid = $(this).val(); $('#example').DataTable({ ajax: { url: "<?php echo site_url('Ajax/getStudents'); ?>", type: "POST", data: function(d){ d.sessionid = $("#sessionid").val(); d.classid = $("#classid").val(); } }, dom: 'Bfrtip', iDisplayLength: 15, buttons: [ 'copyHtml5', 'excelHtml5', 'csvHtml5', 'pdfHtml5', 'pageLength' ], search: true }); });
<table id="datatable-responsive" class="table table-sm table-striped table-bordered dt-responsive nowrap" cellspacing="0" width="100%"> <thead <tr><th colspan="5" class="text-danger">Student's Detail</tr> <tr> <th class="text-primary">Student Name</th> <th class="text-primary">Father Name</th> <th class="text-primary">Roll Number</th> <th class="text-primary">Mobile</th> <th></th> </tr> </thead> </table>
$("#classid").change(function(){ $("#datatable-responsive").dataTable({ dom: 'Bfrtip', buttons: [ 'copy', 'csv', 'excel', 'pdf' ], ajax: { url: "<?php echo site_url('Ajax/getStudents'); ?>", type: "POST", data: function(d){ d.sessionid = $("#sessionid").val(); d.classid = $("#classid").val(); }, columns: [ { data: 'studentname' }, { data: 'fathername' }, { data: 'rollno' }, { data: 'mobile1' } ] }, }); $("#datatable-responsive").dataTable().api().draw(true); });
SELECT id, avg_grade_point, FIND_IN_SET( avg_grade_point, ( SELECT GROUP_CONCAT( DISTINCT avg_grade_point ORDER BY avg_grade_point DESC ) AS Rank FROM final_results WHERE academic_year_id = 6 AND class_id = 1 ) ) AS rank FROM final_results WHERE academic_year_id = 6 AND class_id = 1
public ActionResult GetClassFee(int? Classid) { ClassFeeVM CFee = new ClassFeeVM(); if (Classid != null) { List<ClassFee> classfees = db.ClassFees.Where(p => p.tblClass.ClassID == Classid).ToList(); foreach (var item in classfees) { CFee.ClassFee = item.ClassFee1; CFee.ClassID = item.ClassID; CFee.ClassName = item.tblClass.ClassName; CFee.FeeType = item.tblFeeType.FeeType; } ViewBag.ClassFees = CFee; } return PartialView("_ClassFee"); }
@{ var cfv = ViewBag.ClassFees; } @if (cfv != null) { foreach (var item in cfv) { <p>item.ClassFee1</p> <p>item.FeeType</p> <p>item.ClassFee</p> } }
Private Sub Login() Try sqL = "SELECT * FROM staff WHERE uname = '" & txtUsername.Text & "' AND upasswd = '" & txtPassword.Text & "'" ConnDB() cmd = New MySqlCommand(sqL, conn) drlogin = cmd.ExecuteReader() If drlogin.Read = True Then Me.PictureBox1.Image = My.Resources.lock_open_48 If LCase(drlogin("role")) = "admin" Then MsgBox("Welcome to Tsoft POS and Inventory System", MsgBoxStyle.Information, "Login") frmMain.tsslUser.Text = UCase(txtUsername.Text) frmMain.tsslUser.Tag = drlogin("ID") isCashier = False isAdmin = True frmMain.Show() Me.Hide() End If If LCase(drlogin("role")) = "user" Then MsgBox("Welcome to Tsoft POS and Inventory System", MsgBoxStyle.Information, "Login") strCashierID = drlogin("ID") frmMain.Show() isCashier = True isAdmin = False Me.Hide() End If Else Me.PictureBox1.Image = My.Resources.lock_48 MsgBox("Incorrect username or password.", MsgBoxStyle.Critical, "Login") txtUsername.SelectAll() txtPassword.SelectAll() End If Catch ex As Exception MsgBox(ex.Message) Finally cmd.Dispose() conn.Close() End Try End Sub
Try ConnDB() cmd = New MySqlCommand(sqL, conn) For i As Integer = 0 To Me.DataGridView1.Rows.Count - 1 sqL = "INSERT INTO `dailysale`(`billno`,`customer_id`, `product_id`, `qty`, `price`, `total`, `description`) VALUES('@billno','@custid''@product', '@qty', '@price', '@total', '@desc')" 'datatype integer With cmd .Parameters.Clear() .Parameters.AddWithValue("@billno", txtbillno.Text) .Parameters.AddWithValue("@custid", txtCustomer.Tag) .Parameters.AddWithValue("@product", Me.DataGridView1.Rows(i).Cells(1).Value) .Parameters.AddWithValue("@qty", Me.DataGridView1.Rows(i).Cells(2).Value) .Parameters.AddWithValue("@price", Me.DataGridView1.Rows(i).Cells(3).Value) .Parameters.AddWithValue("@total", Me.DataGridView1.Rows(i).Cells(4).Value) .Parameters.AddWithValue("@desc", Me.DataGridView1.Rows(i).Cells(5).Value) End With Next sqL &= "INSERT INTO `customer_payments`(`customer_id`, `billno`, `cdate`, `bill_amount`, `paid_amount`, `discount`, `ret_amount`, `balance`) VALUES ('" & txtCustomer.Tag & "','" & txtbillno.Text & "','" & DateTimePicker1.Value & "','" & txtbill_amount.Text & "','" & txtpaid_amount.Text & "','" & txtdiscount.Text & "','" & txtret_amount.Text & "','" & txttotalbalance.Text & "')" cmd.ExecuteNonQuery() MsgBox("New Bill successfully created.", MsgBoxStyle.Information, "Create Bill") Catch ex As Exception MsgBox(ex.ToString) Finally cmd.Dispose() conn.Close() End Try