public void loadVisitedPatientsName(string name) { string query = "SELECT opd.opd AS OPD, opd.patient_id AS PatientID, patients.name AS PatientsName, patients.gender AS Gender, patients.family_head AS FamilyHead, opd.doctor AS Doctor, (opd.timestamp) AS VisitTime FROM opd INNER JOIN patients ON opd.patient_id = patients.patient_id WHERE opd.date='" + DateTime.Today.ToString("yyyyMMdd") + "' AND patients.name LIKE '%" + name + "%' ORDER BY opd.timestamp DESC"; dbconnect db = new dbconnect(); db.data_adapter(query, db.con); table = new DataTable(); db.da.Fill(table); db.dbclose(); }
public void loadStoreIndentStore(string indent_no) { string query = "SELECT medicine_id AS ID, medicine_name AS MedicineName, store_stock AS StoreStock, qty AS IndentQty, sno AS UniqueID FROM storeindent WHERE indent_no='" + indent_no + "' AND received='0' ORDER BY MedicineName ASC"; dbconnect db = new dbconnect("medicines"); db.data_adapter(query, db.con); table = new DataTable(); table.TableName = "indentDisp"; db.da.Fill(table); db.dbclose(); }
public void loadDispIndentStore() { string query = "SELECT medicine_id AS ID, medicine_name AS MedicineName, disp_stock AS DispStock, qty AS IndentQty, sno AS UniqueID FROM dispindent WHERE indent_no='" + DateTime.Now.ToString("yyyyMMdd") + "' AND issued='0' ORDER BY timestamp ASC"; dbconnect db = new dbconnect("medicines"); db.data_adapter(query, db.con); table = new DataTable(); table.TableName = "indentDisp"; db.da.Fill(table); db.dbclose(); }
public void loadExpiredMedicine(string office) { string query = "SELECT medicine_id AS ID, medicine_name AS Medicine_Name, medicine_type AS Medicine_Type, SUM(quantity) AS Total_Quantity FROM expired WHERE office='" + office + "' GROUP BY medicine_id ORDER BY Medicine_Name"; dbconnect db = new dbconnect("medicines"); db.data_adapter(query, db.con); table = new DataTable(); table.TableName = "expiredStock"; db.da.Fill(table); db.dbclose(); }
public void patientsToVisit(string token) { string query = "SELECT token.opd AS OPD, token.patient_id AS PatientID, token.date AS Date, patients.name AS PatientName, patients.gender AS Gender, patients.dob AS DateOfBirth, token.token_no AS Token FROM token INNER JOIN patients on token.patient_id=patients.patient_id WHERE token.date='" + DateTime.Today.ToString("yyyy-MM-dd") + "' AND status=0 AND token.token_no=" + token + " ORDER BY token.token_no"; dbconnect db = new dbconnect(); db.data_adapter(query, db.con); table = new DataTable(); table.TableName = "PatientList"; db.da.Fill(table); db.dbclose(); }
public void loadStoreIndentReceived(string indentNo) { string query = "SELECT medicine_id AS ID, medicine_name AS MedicineName, store_stock AS StoreStock, qty AS IndentQty, received AS ReceivedQty FROM storeindent WHERE indent_no='" + indentNo + "' ORDER BY medicine_name ASC"; dbconnect db = new dbconnect("medicines"); db.data_adapter(query, db.con); table = new DataTable(); table.TableName = "indentStore"; db.da.Fill(table); db.dbclose(); }
public void loadPatients(string like) { string query = "SELECT patient_id AS Patient_ID,name AS Patient_Name,gender AS Gender,family_head AS Family_Head,category AS Category FROM patients WHERE patient_id LIKE '" + like + "%' ORDER BY name ASC"; dbconnect db = new dbconnect(); db.data_adapter(query, db.con); table = new DataTable(); table.TableName = "patient"; db.da.Fill(table); db.dbclose(); }
public void loadStoreIndent() { string query = "SELECT medicine_id AS ID, medicine_name AS MedicineName, store_stock AS StoreStock, qty AS IndentQty FROM storeindent WHERE indent_no='" + DateTime.Now.ToString("yyyyMMdd") + "' ORDER BY MedicineName ASC"; dbconnect db = new dbconnect("medicines"); db.data_adapter(query, db.con); table = new DataTable(); table.TableName = "indentDisp"; db.da.Fill(table); db.dbclose(); }
public void loadMedicineStore(string like) { string query = "SELECT medicine_id AS ID,medicine_name AS MedicineName,medicine_type AS MedicineType, store_stock AS StoreStock FROM medicines WHERE Medicine_Name LIKE '%" + like + "%' ORDER BY MedicineName"; dbconnect db = new dbconnect("medicines"); db.data_adapter(query, db.con); table = new DataTable(); table.TableName = "patient"; db.da.Fill(table); db.dbclose(); }
public void loadDispIndentIssued(string indentNo) { string query = "SELECT medicine_id AS ID, medicine_name AS MedicineName, disp_stock AS DispStock, qty AS IndentQty, issued AS IssuedQty FROM dispindent WHERE indent_no='" + indentNo + "' ORDER BY medicine_name ASC"; dbconnect db = new dbconnect("medicines"); db.data_adapter(query, db.con); table = new DataTable(); table.TableName = "indentDisp"; db.da.Fill(table); db.dbclose(); }
public void loadMedicineDisp() { string query = "SELECT medicine_id AS ID,medicine_name AS MedicineName,medicine_type AS MedicineType,disp_stock AS DispStock FROM medicines ORDER BY MedicineName"; dbconnect db = new dbconnect("medicines"); db.data_adapter(query, db.con); table = new DataTable(); table.TableName = "patient"; db.da.Fill(table); db.dbclose(); }
public void listMedicine(string like) { dbconnect db = new dbconnect("medicines"); string query = "SELECT * FROM medicines WHERE medicine_name LIKE '%" + like + "%' ORDER BY medicine_name ASC"; db.data_adapter(query, db.con); table = new DataTable(); table.TableName = "medicineList"; db.da.Fill(table); table.Columns.Add("medicineDetail", typeof(string), "medicine_name + ' -- ' + medicine_type"); db.dbclose(); }
public void fullMedicineList() { string qu = "SELECT medicine_id AS MedicineID,medicine_name AS MedicineName,medicine_type AS MedicineType,timestamp AS CreatedOn, created_by AS CreatedBy FROM medicines ORDER BY medicine_name ASC"; table = new DataTable(); dbconnect db = new dbconnect("medicines"); db.data_adapter(qu, db.con); table.TableName = "medicineList"; db.da.Fill(table); db.dbclose(); }
public void listMedicine() { string qu = "SELECT medicine_id,medicine_name,medicine_type FROM medicines ORDER BY medicine_name ASC"; table = new DataTable(); dbconnect db = new dbconnect("medicines"); db.data_adapter(qu, db.con); table.TableName = "medicineList"; db.da.Fill(table); table.Columns.Add("medicineDetail", typeof(string), "medicine_name + ' -- ' + medicine_type"); db.dbclose(); }