Yasaki Kondo
Yasaki Kondo
Explore posts from servers
CC#
Created by Yasaki Kondo on 8/14/2024 in #help
I need help asap
No description
12 replies
CC#
Created by Yasaki Kondo on 8/14/2024 in #help
I need help asap
No description
12 replies
CC#
Created by Yasaki Kondo on 8/14/2024 in #help
I need help asap
@Jimmacle
C#
public IActionResult Update(Guid id)
{
var Find = _db.Students.FirstOrDefault(x => x.Id == id);
return View(Find);
}
[HttpPost]
public IActionResult Update(Student st)
{
_db.Students.Update(st);
_db.SaveChanges();
return RedirectToAction("List");
}
public IActionResult Delete(Guid id)
{
var Find = _db.Students.FirstOrDefault(x => x.Id == id);
_db.Students.Remove(Find);
_db.SaveChanges();
return RedirectToAction("List");
}
C#
public IActionResult Update(Guid id)
{
var Find = _db.Students.FirstOrDefault(x => x.Id == id);
return View(Find);
}
[HttpPost]
public IActionResult Update(Student st)
{
_db.Students.Update(st);
_db.SaveChanges();
return RedirectToAction("List");
}
public IActionResult Delete(Guid id)
{
var Find = _db.Students.FirstOrDefault(x => x.Id == id);
_db.Students.Remove(Find);
_db.SaveChanges();
return RedirectToAction("List");
}
here's the code, got any ideas?
12 replies
CC#
Created by Yasaki Kondo on 8/14/2024 in #help
I need help asap
both the delete and edit function
12 replies
CC#
Created by Yasaki Kondo on 8/14/2024 in #help
I need help asap
well it seems like it can't find the ID :/
12 replies
CC#
Created by Yasaki Kondo on 8/14/2024 in #help
I need help asap
No description
12 replies
CC#
Created by Yasaki Kondo on 8/14/2024 in #help
I need help asap
No description
12 replies
CC#
Created by Yasaki Kondo on 8/5/2024 in #help
How to click on link?
https://lms.poly.edu.vn/ here's the link on the website and the word Ha Noi is the think I'm trying to get to click
9 replies
CC#
Created by Yasaki Kondo on 8/5/2024 in #help
How to click on link?
C#
using OpenQA.Selenium.Chrome;
using OpenQA.Selenium.Support.UI;
using OpenQA.Selenium;

namespace Lab6_KiemThuNangCao
{
internal class Program
{
static void Main(string[] args)
{
//Open Chrome
IWebDriver driver = new ChromeDriver();

//go to link
driver.Navigate().GoToUrl("https://lms.poly.edu.vn");

Thread.Sleep(1000);

//login
IWebElement menuButton = driver.FindElement(By.LinkText("Ha Noi"));
menuButton.Click();

// Go back to the home page and refresh the browser
driver.Navigate().Back();
driver.Navigate().Refresh();

// Enter the login credentials and click the login button
IWebElement usernameField = driver.FindElement(By.Id("thieuddph45736"));
IWebElement passwordField = driver.FindElement(By.Id("Thieu1810"));
IWebElement loginButton = driver.FindElement(By.Id("login-btn"));

//quit
driver.Quit();
}
}
}
C#
using OpenQA.Selenium.Chrome;
using OpenQA.Selenium.Support.UI;
using OpenQA.Selenium;

namespace Lab6_KiemThuNangCao
{
internal class Program
{
static void Main(string[] args)
{
//Open Chrome
IWebDriver driver = new ChromeDriver();

//go to link
driver.Navigate().GoToUrl("https://lms.poly.edu.vn");

Thread.Sleep(1000);

//login
IWebElement menuButton = driver.FindElement(By.LinkText("Ha Noi"));
menuButton.Click();

// Go back to the home page and refresh the browser
driver.Navigate().Back();
driver.Navigate().Refresh();

// Enter the login credentials and click the login button
IWebElement usernameField = driver.FindElement(By.Id("thieuddph45736"));
IWebElement passwordField = driver.FindElement(By.Id("Thieu1810"));
IWebElement loginButton = driver.FindElement(By.Id("login-btn"));

//quit
driver.Quit();
}
}
}
9 replies
CC#
Created by Yasaki Kondo on 7/8/2024 in #help
✅ Trying out NUnit test, I need help!
yeah Compiler Error CS5001
27 replies
CC#
Created by Yasaki Kondo on 7/8/2024 in #help
✅ Trying out NUnit test, I need help!
well it said cs5001 I think
27 replies
CC#
Created by Yasaki Kondo on 7/8/2024 in #help
✅ Trying out NUnit test, I need help!
:v
27 replies
CC#
Created by Yasaki Kondo on 7/8/2024 in #help
✅ Trying out NUnit test, I need help!
wait didn't the error shown below?
27 replies
CC#
Created by Yasaki Kondo on 7/8/2024 in #help
✅ Trying out NUnit test, I need help!
thanks for the notice
27 replies
CC#
Created by Yasaki Kondo on 7/8/2024 in #help
✅ Trying out NUnit test, I need help!
Well I just code a long, didn't realise I did the factorial wrong
27 replies
CC#
Created by Yasaki Kondo on 7/8/2024 in #help
✅ Trying out NUnit test, I need help!
No description
27 replies
CC#
Created by Yasaki Kondo on 7/8/2024 in #help
✅ Trying out NUnit test, I need help!
I found the problem
27 replies
CC#
Created by Yasaki Kondo on 7/8/2024 in #help
✅ Trying out NUnit test, I need help!
nvm
27 replies
CC#
Created by Yasaki Kondo on 12/5/2023 in #help
It's not showing the database in datagridview
the server is connected, I've to arranged the items so that in the upcoming test I have to do the same thing idk what's wrong here
5 replies
CC#
Created by Yasaki Kondo on 12/5/2023 in #help
It's not showing the database in datagridview
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
{
int d = e.RowIndex;
textBox1.Text = dataGridView1.Rows[d].Cells[0].Value.ToString();
textBox2.Text = dataGridView1.Rows[d].Cells[1].Value.ToString();
textBox3.Text = dataGridView1.Rows[d].Cells[2].Value.ToString();
dateTimePicker1.Value = Convert.ToDateTime(dataGridView1.Rows[d].Cells[4].Value.ToString());
string gioiTinh = dataGridView1.Rows[d].Cells[3].Value.ToString();
if (gioiTinh.Equals(1))
{
checkBox1.Checked = true;
checkBox2.Checked = false;
}
else
{
checkBox1.Checked = false;
checkBox2.Checked = true;
}
comboBox1.Text = dataGridView1.Rows[d].Cells[4].Value.ToString();
}
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
{
int d = e.RowIndex;
textBox1.Text = dataGridView1.Rows[d].Cells[0].Value.ToString();
textBox2.Text = dataGridView1.Rows[d].Cells[1].Value.ToString();
textBox3.Text = dataGridView1.Rows[d].Cells[2].Value.ToString();
dateTimePicker1.Value = Convert.ToDateTime(dataGridView1.Rows[d].Cells[4].Value.ToString());
string gioiTinh = dataGridView1.Rows[d].Cells[3].Value.ToString();
if (gioiTinh.Equals(1))
{
checkBox1.Checked = true;
checkBox2.Checked = false;
}
else
{
checkBox1.Checked = false;
checkBox2.Checked = true;
}
comboBox1.Text = dataGridView1.Rows[d].Cells[4].Value.ToString();
}
5 replies