Пример #1
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            Page.Validate("AddEdit");
            if (Page.IsValid)
            {
                try
                {
                    ItemService.AddOrUpdateItem(
                        RowID,
                        txtCode.Text,
                        txtName.Text,
                        ddlType.SelectedValue,
                        Convert.ToInt32(ddlSupplier.SelectedValue),
                        txtUnitName1.Text,
                        chkIsTaxable.Checked,
                        txtUnitName2.Text,
                        txtUnitName3.Text,
                        Convert.ToDecimal(ntbUnitRatio2.Value),
                        Convert.ToDecimal(ntbUnitRatio3.Value));
                    mvwForm.SetActiveView(viwRead);

                    ReloadCurrentPage();
                }
                catch (Exception ex)
                {
                    WebFormHelper.SetLabelTextForException(lblStatusAddEdit, ex, LabelStyleNames.ErrorMessage);
                }
            }
        }