Exemple #1
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        try
        {
            switch (RowID)
            {
            case 0:
                classProvider.AddRoom(
                    txtCode.Text,
                    txtName.Text,
                    chkIsActive.Checked);
                break;

            default:
                classProvider.UpdateRoom(
                    RowID,
                    txtCode.Text,
                    txtName.Text,
                    chkIsActive.Checked);
                break;
            }
            Refresh();
        }
        catch (Exception ex)
        {
            mvwForm.ActiveViewIndex = 0;
            WebFormHelper.SetLabelTextWithCssClass(lblMessage, ex.Message, LabelStyleNames.ErrorMessage);
        }
    }