Ejemplo n.º 1
0
        protected void lnkSave_Click(object sender, EventArgs e)
        {
            string            relation1    = Constants.DelimeterSinglePipe + Teams.Where(x => x.Selected).Select(a => a.Value).ToList().ToCharSeperatedString(Constants.DelimeterSinglePipe);
            DataViewSetupInfo stageMasters = new DataViewSetupInfo();

            stageMasters.Add(new DataViewSetup
            {
                DataType     = Type,
                Id           = StageId,
                Stage        = StageName,
                Relation1    = relation1,
                Relation2    = SubLink,
                ActionLink   = Link,
                Suspend      = false,
                Referances   = ReferencesData,
                DataBaseInfo = UserContext.DataBaseInfo,
                Action       = Action
            });
            if (_controlPanel.SetStages(stageMasters))
            {
                CustomMessageControl.MessageBodyText = GlobalCustomResource.StageMasterSaved;
                CustomMessageControl.MessageType     = MessageTypes.Success;
                CustomMessageControl.ShowMessage();
                AuditLog.LogEvent(UserContext, SysEventType.INFO, "Stage MASTER SAVED",
                                  GlobalCustomResource.StageMasterSaved, true);
                ClearForm();
                DivAction = false;
                BindData(BindType.List);
                ScriptManager.RegisterStartupScript(Page, typeof(Page), "openTabFunctionCall", "openTab(1)", true);
            }
            else
            {
                CustomMessageControl.MessageBodyText = GlobalCustomResource.StageMasterFailed;
                CustomMessageControl.MessageType     = MessageTypes.Error;
                CustomMessageControl.ShowMessage();
                AuditLog.LogEvent(UserContext, SysEventType.INFO, "Stage MASTER UPDATE FAILED",
                                  GlobalCustomResource.StageMasterFailed, true);
            }
        }