コード例 #1
0
ファイル: Employees.aspx.cs プロジェクト: jbob24/KPFF
        protected void dgEmployees_RowDeleting(object sender, System.Web.UI.WebControls.GridViewDeleteEventArgs e)
        {
            string strSQL = "";
            clsGeneral General = new clsGeneral();
            int intEmployeeID = e.Keys[0].GetValueOrDefault<int>();

            if (!(intEmployeeID == 0))
            {
                //Check to see if Child records exist
                strSQL = "DELETE FROM tblSchedule ";
                strSQL += "WHERE EmployeeID = " + intEmployeeID;
                General.DeleteRecord(strSQL);
            }
        }
コード例 #2
0
ファイル: EmployeeEdit.aspx.cs プロジェクト: jbob24/KPFF
        private void DeleteUser(int intEmployeeID)
        {
            clsGeneral General = new clsGeneral();

            strSQL = "DELETE FROM tblUsers ";
            strSQL += "WHERE EmployeeID = " + intEmployeeID;

            General.DeleteRecord(strSQL);
        }