Example #1
0
 void getStaffInfo()
 {
     getData          = new cGetDataFromSql();
     getData.sqlQuery = "select staffID, staffNameSurname as Name, dutyName as Duty, staffUserName as Username, staffPassword as Password, staffPhoneNumber as Phone, staffStatus as Status, staffPhoto as Photo from STAFFS, DUTIES where DUTIES.dutyID = STAFFS.staffDuty";
     getData.GetDataFromSql();
     dGridView.DataSource = getData.dataTable;
 }
Example #2
0
 void showAllProducts()
 {
     getData          = new cGetDataFromSql();
     getData.sqlQuery = "select categoryName as 'Category', productName as 'Product', Explanation, "
                        + "case when productStatus = 1 then 'Available' else 'Absent' end as 'Status', Price "
                        + "from PRODUCTS inner join CATEGORIES on PRODUCTS.categoryID = CATEGORIES.categoryID order by categoryName";
     getData.GetDataFromSql();
     dGridView.DataSource = getData.dataTable;
 }
Example #3
0
 private void btnShowStaffAct_Click(object sender, EventArgs e)
 {
     hideControls();
     isStaffActClicked = true;
     getData           = new cGetDataFromSql();
     getData.sqlQuery  = "select staffNameSurname, dutyName, staffUserName, staffPhoto, entranceTime, "
                         + "exitTime from STAFFS, STAFFACTIVITY, DUTIES where STAFFS.staffID = STAFFACTIVITY.staffID "
                         + "and STAFFS.staffDuty = DUTIES.dutyID";
     getData.GetDataFromSql();
     dGridView.DataSource = getData.dataTable;
 }
Example #4
0
        void getDutyNames()
        {
            getData          = new cGetDataFromSql();
            getData.sqlQuery = "select dutyName from DUTIES";
            getData.GetDataFromSql();
            CBoxStaffDuty.DataSource    = getData.dataTable;
            CBoxStaffDuty.DisplayMember = "dutyName";

            /*for (int row = 0; row < getData.dataTable.Rows.Count; row++)
             * {
             *  CBoxStaffDuty.Items.Add(getData.dataTable.Rows[row][0]);
             * }*/
        }
 void getTables()
 {
     getData          = new cGetDataFromSql();
     getData.sqlQuery = "select * from tables where tableStatus = 1";
     getData.GetDataFromSql();
 }
 void getProductsByCategory(int categoryId)
 {
     getData          = new cGetDataFromSql();
     getData.sqlQuery = "select * from PRODUCTS where categoryID = " + categoryId.ToString();
     getData.GetDataFromSql();
 }
 void getCategories()
 {
     getData          = new cGetDataFromSql();
     getData.sqlQuery = "select categoryName from CATEGORIES";
     getData.GetDataFromSql();
 }