Example #1
0
 public static STD_Routine GetSTD_RoutineByRoutineID(int RoutineID)
 {
     STD_Routine sTD_Routine = new STD_Routine();
     SqlSTD_RoutineProvider sqlSTD_RoutineProvider = new SqlSTD_RoutineProvider();
     sTD_Routine = sqlSTD_RoutineProvider.GetSTD_RoutineByRoutineID(RoutineID);
     return sTD_Routine;
 }
Example #2
0
 protected void btnAdd_Click(object sender, EventArgs e)
 {
     try
     {
         if(ddlCampus.SelectedIndex!=0){
         STD_Routine sTD_Routine = new STD_Routine ();
     //	sTD_Routine.RoutineID=  int.Parse(ddlRoutineID.SelectedValue);
         sTD_Routine.RoutineName=  ddlCampus.SelectedValue;
         sTD_Routine.StartDate=   DateTime.Parse(txtStartDate.Text);
         sTD_Routine.EndDate=   DateTime.Parse(txtEndDate.Text);
         sTD_Routine.AddedBy=  Profile.card_id;
         sTD_Routine.AddedDate=  DateTime.Now;
         sTD_Routine.UpdatedBy=  Profile.card_id;
         sTD_Routine.UpdateDate = DateTime.Now;
         int resutl =STD_RoutineManager.InsertSTD_Routine(sTD_Routine);
         }
     }
     catch (Exception ex) { } Response.Redirect("AdminDisplaySTD_Routine.aspx");
 }
Example #3
0
 protected void btnUpdate_Click(object sender, EventArgs e)
 {
     try
     {
         if (ddlCampus.SelectedIndex != 0)
         {
             STD_Routine sTD_Routine = new STD_Routine();
             sTD_Routine.RoutineID = int.Parse(Request.QueryString["ID"].ToString());
             sTD_Routine.RoutineName = ddlCampus.SelectedValue;
             sTD_Routine.StartDate = DateTime.Parse(txtStartDate.Text);
             sTD_Routine.EndDate = DateTime.Parse(txtEndDate.Text);
             sTD_Routine.AddedBy = Profile.card_id;
             sTD_Routine.AddedDate = DateTime.Now;
             sTD_Routine.UpdatedBy = Profile.card_id;
             sTD_Routine.UpdateDate = DateTime.Now;
             bool resutl = STD_RoutineManager.UpdateSTD_Routine(sTD_Routine);
         }
     }
     catch (Exception ex) { } Response.Redirect("AdminDisplaySTD_Routine.aspx");
 }
Example #4
0
 public static bool UpdateSTD_Routine(STD_Routine sTD_Routine)
 {
     SqlSTD_RoutineProvider sqlSTD_RoutineProvider = new SqlSTD_RoutineProvider();
     return sqlSTD_RoutineProvider.UpdateSTD_Routine(sTD_Routine);
 }
Example #5
0
 public static int InsertSTD_Routine(STD_Routine sTD_Routine)
 {
     SqlSTD_RoutineProvider sqlSTD_RoutineProvider = new SqlSTD_RoutineProvider();
     return sqlSTD_RoutineProvider.InsertSTD_Routine(sTD_Routine);
 }
Example #6
0
 private void showSTD_RoutineData()
 {
     STD_Routine sTD_Routine  = new STD_Routine ();
      	sTD_Routine = STD_RoutineManager.GetSTD_RoutineByRoutineID(Int32.Parse(Request.QueryString["ID"]));
     ddlCampus.SelectedValue = sTD_Routine.RoutineName.ToString();
      	txtStartDate.Text =sTD_Routine.StartDate.ToString();
      	txtEndDate.Text =sTD_Routine.EndDate.ToString();
 }