private void ED_EditFeedback(object sender, EventArgs e) { DB_Handler DB_Class = new DB_Handler(); var feedback = ((Editor)sender).Text; var exerciseView = exList.First(ex => ex.IsFocused); if (exerciseView.FeedbackText != feedback) { exerciseView.FeedbackText = feedback; DB_Class.InsertOrUpdateFeedback(feedback, exerciseView.Note_ID, exerciseView.Feed_ID); } }
private void ED_EditNote(object sender, EventArgs e) { DB_Handler DB_Class = new DB_Handler(); var note = ((Editor)sender).Text; var exerciseView = exList.First(ex => ex.IsFocused); if (exerciseView.Notes != note) { exerciseView.Notes = note; DB_Class.InsertOrUpdateNote(exerciseView.Notes, exerciseView.Note_ID, exerciseView.ID); } }
public string GetFeedback() { var db = new DB_Handler(); var result = db.GetFeedbackFromNoteID(Note_ID); if (!result.Equals(null)) { Feed_ID = result.Id; FeedbackText = result.FeedbackText; } if (string.IsNullOrEmpty(FeedbackText)) { return("No feedback yet"); } return(FeedbackText); }
public ExerciseListView(TopicTask tt) { Task = tt; DB_Class = new DB_Handler(); ExerciseList = new List <ExerciseViewModel>(); foreach (Exercise e in Task.Exercises) { ExerciseList.Add(new ExerciseViewModel(e)); } InitializeComponent(); LV_Exercise.ItemsSource = ExerciseList; SelectedExercise = ExerciseList[0]; Notes_input.Text = SelectedExercise.Notes; Content_SL_Exercise.Children.Add(new ExerciseView(ExerciseList[0])); }
protected void Page_Load(object sender, EventArgs e) { Label1.Text = Session["trip"].ToString(); trip = Session["trip"].ToString(); name1 = Session["f_name"].ToString(); name2 = Session["s_name"].ToString(); DropDownList1.Items.Add(name1); DropDownList1.Items.Add(name2); qry = "select ( sum(amount), sum(f_name), sum(s_name)) from expense where session='" + trip + "'"; dbh = new DB_Handler(); ds = dbh.fetchData(qry); }
private void SetValues(Exercise e) { var db = new DB_Handler(); var result = db.GetNoteFromExcerise(e); if (result.Id != 0) { Notes = result.Notes; Note_ID = result.Id; } var feed = db.GetFeedbackFromNoteID(Note_ID); if (Feed_ID != 0) { Feed_ID = feed.Id; FeedbackText = feed.FeedbackText; } }
protected void Button2_Click(object sender, EventArgs e) { trip = Convert.ToString(TextBox1.Text); f_name = Convert.ToString(TextBox3.Text); mail = Convert.ToString(TextBox4.Text); s_name = Convert.ToString(TextBox5.Text); Session["trip"] = TextBox1.Text; Session["f_name"] = TextBox3.Text; Session["mail"] = TextBox4.Text; Session["s_name"] = TextBox5.Text; qry = "insert into details(trip,f_name,mail,s_name) values('" + trip + "','" + f_name + "','" + mail + "','" + s_name + "')"; dbh = new DB_Handler(); int row = dbh.execData(qry); Response.Redirect("Expense.aspx"); }
private void RefreshTask() { DB_Handler db = new DB_Handler(); task = db.GetTopicTaskFromID(task.Id); }