Beispiel #1
0
        public void TestInitialize()
        {
            _fixture    = new Fixture();
            _httpClient = new Mock <IHttpClient>(MockBehavior.Strict);

            _courseSource = new CourseSource(_httpClient.Object);
        }
Beispiel #2
0
 protected void Button_InsertCourse_Click(object sender, EventArgs e)
 {
     if (IsValid)
     {
         CourseSource.InsertParameters["Crs_Name"].DefaultValue     = TextBox_Crs_Name.Text;
         CourseSource.InsertParameters["Crs_Duration"].DefaultValue = TextBox_Crs_Duration.Text;
         CourseSource.Insert();
         TextBox_Crs_Name.Text     = string.Empty;
         TextBox_Crs_Duration.Text = string.Empty;
     }
 }
Beispiel #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["Role"].ToString() != "Admin")
     {
         Response.Redirect("../Anonymous/ErrorPage.aspx");
     }
     if (!Page.IsPostBack)
     {
         CourseSource.SelectParameters["st_id"].DefaultValue = ((Label)GridView_st.Rows[0].Cells[0].FindControl("Label_St_Id")).Text;
         CourseSource.Select();
     }
 }
Beispiel #4
0
 protected void GridView1_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
 {
     CourseSource.SelectParameters["st_id"].DefaultValue = ((Label)GridView_st.Rows[e.NewSelectedIndex].Cells[0].FindControl("Label_St_Id")).Text;
     CourseSource.Select();
 }