Пример #1
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            string msg = string.Empty;

            if (!CheckInput(out msg))
            {
                BaseWebsitePage.ShowMessageToClient(msg, 2, false, false);
                return;
            }
            CompanysEntity model = GetEntity();

            if (companyApp.UpdateCompany(model))
            {
                InitControl(model);
                BaseWebsitePage.ShowSuccessMessageToClient(false, false);
            }
            else
            {
                BaseWebsitePage.ShowFailMessageToClient(companyApp.BrokenRuleMessages, false);
            }
        }
Пример #2
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            string msg = string.Empty;

            if (!CheckInput(out msg))
            {
                ShowMessageToClient(msg, 2, false, false);
                return;
            }
            CompanysEntity model = GetEntity();

            if (companyApp.UpdateCompany(model))
            {
                InitControl(model);
                Redirect(Request.RawUrl, true);
            }
            else
            {
                ShowFailMessageToClient(companyApp.BrokenRuleMessages, false);
            }
        }