Beispiel #1
0
        protected void lnkBtnServerEdit_Click(object sender, EventArgs e)
        {
            this.pnlKeyType.Visible = true;

            this.lbResultContext.Text = "";
            LinkButton lnkBtnServerEdit = sender as LinkButton;

            if (lnkBtnServerEdit == null)
            {
                this.ownerPage.ShowMSG("lnkBtnServerEdit is null");
                return;
            }
            string idRowMasterKey = BaseHelper.ParseStringByAmpersand(lnkBtnServerEdit.CommandArgument)["idRowMasterKey"].ToString();

            this.currentEntity = this.ownerPage.AdminClientRef.GetKeyTypeByKeyTypeID(idRowMasterKey);

            if (currentEntity != null)
            {
                this.tbxName.Text           = currentEntity.Name;
                this.tbxKeyTypeIntCode.Text = currentEntity.KeyTypeIntCode;
                this.tbxDescription.Text    = currentEntity.Description;
                this.cbxIsSystem.Checked    = currentEntity.IsSystemBool;
            }

            this.hdnRowMasterKey.Value = currentEntity.idKeyType.ToString();

            LoadKeyValues(currentEntity.idKeyType.ToString());
        }
Beispiel #2
0
        public override void UserControlLoad()
        {
            if (this.ownerPage == null)
            {
                throw new UMSException("Current Page is null or is not inheritor of BasicPage.");
            }

            this.pnlKeyType.Visible = true;

            ClearResultContext(lbResultContext);

            this.currentEntity = this.ownerPage.AdminClientRef.GetKeyTypeByKeyTypeID(CurrentEntityMasterID);

            if (currentEntity != null)
            {
                this.tbxName.Text = currentEntity.Name;
                this.tbxKeyTypeIntCode.Text = currentEntity.KeyTypeIntCode;
                this.tbxDescription.Text = currentEntity.Description;
                this.cbxIsSystem.Checked = currentEntity.IsSystemBool;
                this.hdnRowMasterKey.Value = currentEntity.idKeyType.ToString();

                LoadKeyValues(currentEntity.idKeyType.ToString());
            }
            else
            {
                this.tbxName.Text = string.Empty;
                this.tbxKeyTypeIntCode.Text = string.Empty;
                this.tbxDescription.Text = string.Empty;
                this.cbxIsSystem.Checked = false;
                this.hdnRowMasterKey.Value = string.Empty;
            }

            if (currentCallerDropDownList != null && currentCallerDropDownList.UniqueID != null)
            {
                this.hdnCurrentCallerDropDownListUniqueID.Value = currentCallerDropDownList.UniqueID;
                this.TabContainer.ActiveTab = this.tabValues;
            }


        }
Beispiel #3
0
        public override void UserControlLoad()
        {
            if (this.ownerPage == null)
            {
                throw new UMSException("Current Page is null or is not inheritor of BasicPage.");
            }

            this.pnlKeyType.Visible = true;

            ClearResultContext(lbResultContext);

            this.currentEntity = this.ownerPage.AdminClientRef.GetKeyTypeByKeyTypeID(CurrentEntityMasterID);

            if (currentEntity != null)
            {
                this.tbxName.Text           = currentEntity.Name;
                this.tbxKeyTypeIntCode.Text = currentEntity.KeyTypeIntCode;
                this.tbxDescription.Text    = currentEntity.Description;
                this.cbxIsSystem.Checked    = currentEntity.IsSystemBool;
                this.hdnRowMasterKey.Value  = currentEntity.idKeyType.ToString();

                LoadKeyValues(currentEntity.idKeyType.ToString());
            }
            else
            {
                this.tbxName.Text           = string.Empty;
                this.tbxKeyTypeIntCode.Text = string.Empty;
                this.tbxDescription.Text    = string.Empty;
                this.cbxIsSystem.Checked    = false;
                this.hdnRowMasterKey.Value  = string.Empty;
            }

            if (currentCallerDropDownList != null && currentCallerDropDownList.UniqueID != null)
            {
                this.hdnCurrentCallerDropDownListUniqueID.Value = currentCallerDropDownList.UniqueID;
                this.TabContainer.ActiveTab = this.tabValues;
            }
        }
Beispiel #4
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            pnlKeyType.Visible = true;

            if (string.IsNullOrEmpty(this.hdnRowMasterKey.Value))
            {
                this.currentEntity = new ETEMModel.Models.KeyType();
            }
            else
            {
                this.currentEntity = this.ownerPage.AdminClientRef.GetKeyTypeByKeyTypeID(this.hdnRowMasterKey.Value);

                if (this.currentEntity == null)
                {
                    this.lbResultContext.Text = String.Format(BaseHelper.GetCaptionString("Entity_KeyType_Not_Found_By_ID"), this.hdnRowMasterKey.Value);
                    this.ownerPage.FormLoad();
                    return;
                }
            }



            currentEntity.Name           = this.tbxName.Text;
            currentEntity.KeyTypeIntCode = this.tbxKeyTypeIntCode.Text;
            currentEntity.Description    = this.tbxDescription.Text;
            currentEntity.IsSystemBool   = this.cbxIsSystem.Checked;

            CallContext resultContext = new CallContext();

            resultContext.CurrentConsumerID = this.ownerPage.UserProps.IdUser;

            resultContext = this.ownerPage.AdminClientRef.KeyTypeSave(currentEntity, resultContext);

            this.lbResultContext.Text  = resultContext.Message;
            this.hdnRowMasterKey.Value = resultContext.EntityID;
            this.ownerPage.FormLoad();
            this.ownerPage.ReloadKeyTypeInApplication();
        }
Beispiel #5
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            pnlKeyType.Visible = true;

            if (string.IsNullOrEmpty(this.hdnRowMasterKey.Value))
            {
                this.currentEntity = new ETEMModel.Models.KeyType();
            }
            else
            {
                this.currentEntity = this.ownerPage.AdminClientRef.GetKeyTypeByKeyTypeID(this.hdnRowMasterKey.Value);

                if (this.currentEntity == null)
                {
                    this.lbResultContext.Text = String.Format(BaseHelper.GetCaptionString("Entity_KeyType_Not_Found_By_ID"), this.hdnRowMasterKey.Value);
                    this.ownerPage.FormLoad();
                    return;
                }

            }



            currentEntity.Name = this.tbxName.Text;
            currentEntity.KeyTypeIntCode = this.tbxKeyTypeIntCode.Text;
            currentEntity.Description = this.tbxDescription.Text;
            currentEntity.IsSystemBool = this.cbxIsSystem.Checked;

            CallContext resultContext = new CallContext();

            resultContext.CurrentConsumerID = this.ownerPage.UserProps.IdUser;

            resultContext = this.ownerPage.AdminClientRef.KeyTypeSave(currentEntity, resultContext);

            this.lbResultContext.Text = resultContext.Message;
            this.hdnRowMasterKey.Value = resultContext.EntityID;
            this.ownerPage.FormLoad();
            this.ownerPage.ReloadKeyTypeInApplication();
        }
Beispiel #6
0
        protected void lnkBtnServerEdit_Click(object sender, EventArgs e)
        {
            this.pnlKeyType.Visible = true;

            this.lbResultContext.Text = "";
            LinkButton lnkBtnServerEdit = sender as LinkButton;

            if (lnkBtnServerEdit == null)
            {
                this.ownerPage.ShowMSG("lnkBtnServerEdit is null");
                return;
            }
            string idRowMasterKey = BaseHelper.ParseStringByAmpersand(lnkBtnServerEdit.CommandArgument)["idRowMasterKey"].ToString();
            this.currentEntity = this.ownerPage.AdminClientRef.GetKeyTypeByKeyTypeID(idRowMasterKey);

            if (currentEntity != null)
            {
                this.tbxName.Text = currentEntity.Name;
                this.tbxKeyTypeIntCode.Text = currentEntity.KeyTypeIntCode;
                this.tbxDescription.Text = currentEntity.Description;
                this.cbxIsSystem.Checked = currentEntity.IsSystemBool;
            }

            this.hdnRowMasterKey.Value = currentEntity.idKeyType.ToString();

            LoadKeyValues(currentEntity.idKeyType.ToString());


        }