private void CheckFindFile(TextBox a) { if (String.IsNullOrEmpty(a.Text)) { MessageBox.Show("Invalid values entered. Check the input, please"); } else if (fileLogic.GetTitleForDelete(id, a.Text) == 0) { MessageBox.Show("No such file exists"); } }
private void CheckTextBoxDelete(TextBox a) { if (String.IsNullOrEmpty(a.Text)) { MessageBox.Show("Invalid values entered. Check the input, please"); } else if (fileLogic.GetTitleForDelete(id1, a.Text) == 0) { MessageBox.Show("No such file exists. Check the input, please"); } else { fileLogic.DeleteFile("DeleteFile", TitleBox1.Text, dateTimePicker1.Value, id1); } }
private void CheckEditFile(TextBox a, TextBox b) { if (String.IsNullOrEmpty(a.Text) || String.IsNullOrEmpty(b.Text)) { MessageBox.Show("Invalid values entered. Check the input, please"); } else if (OldTitleBox.Text == NewTitleBox.Text) { MessageBox.Show("Same values entered. Check the input, please"); } else if (fileLogic.GetTitleForDelete(id1, a.Text) == 0) { MessageBox.Show("Old title is incorrect. Check the input, please"); } else { fileLogic.UpdateFile("UpdateFile", OldTitleBox.Text, NewTitleBox.Text, id1); } }
private void CheckSendFile(TextBox a, TextBox b) { if (String.IsNullOrEmpty(a.Text) || String.IsNullOrEmpty(b.Text)) { MessageBox.Show("Invalid values entered. Check the input, please"); } else if (userLogic.GetLoginForSend(b.Text) == 0) { MessageBox.Show("Wrong user login"); } else if (fileLogic.GetTitleForDelete(id, a.Text) == 0) { MessageBox.Show("No such file exists. Check the input, please"); } else { fileLogic.SendFile("SendFile", TitleBox.Text, UserBox.Text, id); } }