protected void btnRegister_Click(object sender, EventArgs e) { if (Page.IsValid) { BusinessLayer.Position.CRUD crud = new BusinessLayer.Position.CRUD(); string message; System.Drawing.Color color; crud.Create(txtPosition.Text, Decimal.Parse(txtSalary.Text), out message, out color); lblMessage.Text = message; lblMessage.ForeColor = color; } }
protected void lblTotalSalary_Load(object sender, EventArgs e) { BusinessLayer.Position.CRUD crud = new BusinessLayer.Position.CRUD(); (sender as Label).Text = "Общо всички заплати : " + crud.GetTotalSalary().ToString("0.00 лв"); }