Esempio n. 1
0
        // facade, simply passing parameters to dataaccess layer. Also invoking DL.
        public DataTable GetSQLresult(string InputString, string ConnectionString)
        {
            DataTable dtSQLresults = new DataTable();
            dataaccess.daSQLapp daSQLsubmit = new dataaccess.daSQLapp();

            dtSQLresults = daSQLsubmit.GetSQLresult(InputString, ConnectionString);    // call DataAccess SQL submitter, set results equal to datatable results (dtSQLresults).

            return dtSQLresults;
        }
Esempio n. 2
0
        protected void gvRaceList_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            int rowIndex = Convert.ToInt32(e.CommandArgument);                                             // row contains current Clicked Gridview Row
            DataKey dkRace = gvRaceList.DataKeys[rowIndex];                                                // set our dkRace datakey to the rowindex datakey value, remember to set GV datakey properties on aspx page to correct value!
            int RaceID = Convert.ToInt32(dkRace.Values["RaceID"]);

            if (e.CommandName == "DeleteJob")
            {

                dataaccess.daSQLapp objRace = new dataaccess.daSQLapp();
                objRace.DelRaceInfo(RaceID, ConnectionString);
                PopulateGridView();

            }
            else if (e.CommandName == "EditDetails")
            {
                int RowIndex = Convert.ToInt32(e.CommandArgument);

            }
        }