コード例 #1
0
        protected void lnkBtnServerEditSlave_Click(object sender, EventArgs e)
        {
            this.pnlKeyValue.Visible  = true;
            this.lbResultContext.Text = "";
            LinkButton lnkBtnServerEditSlave = sender as LinkButton;

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

            this.currentKeyValue = this.ownerPage.AdminClientRef.GetKeyValueByKeyValueID(idRowSlaveKey);

            if (currentKeyValue != null)
            {
                this.tbxKeyValueNameBG.Text      = currentKeyValue.Name;
                this.tbxKeyValueNameEN.Text      = currentKeyValue.NameEN;
                this.tbxKeyValueIntCode.Text     = currentKeyValue.KeyValueIntCode;
                this.tbxKeyValueDescription.Text = currentKeyValue.Description;
                this.tbxKeyValueOrder.Text       = (currentKeyValue.V_Order.HasValue ? currentKeyValue.V_Order.Value.ToString() : string.Empty);
                this.tbxDefaultValue1.Text       = currentKeyValue.DefaultValue1;
                this.tbxDefaultValue2.Text       = currentKeyValue.DefaultValue2;
                this.tbxDefaultValue3.Text       = currentKeyValue.DefaultValue3;
                this.tbxDefaultValue4.Text       = currentKeyValue.DefaultValue4;
                this.tbxDefaultValue5.Text       = currentKeyValue.DefaultValue5;
                this.tbxDefaultValue6.Text       = currentKeyValue.DefaultValue6;
                //this.tbxCodeAdminUNI.Text = currentKeyValue.CodeAdminUNI;
            }

            this.hdnRowSlaveKey.Value = this.currentKeyValue.idKeyValue.ToString();
        }
コード例 #2
0
        protected void btnSaveKeyValue_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(this.hdnRowSlaveKey.Value))
            {
                this.currentKeyValue = new ETEMModel.Models.KeyValue();
            }
            else
            {
                this.currentKeyValue = this.ownerPage.AdminClientRef.GetKeyValueByKeyValueID(this.hdnRowSlaveKey.Value);

                if (this.currentKeyValue == null)
                {
                    this.lbResultContext.Text = String.Format(BaseHelper.GetCaptionString("Entity_KeyValue_Not_Found_By_ID"), this.hdnRowSlaveKey.Value);
                    this.ownerPage.FormLoad();
                    return;
                }
            }


            currentKeyValue.Name            = this.tbxKeyValueNameBG.Text.Trim();
            currentKeyValue.NameEN          = this.tbxKeyValueNameEN.Text.Trim();
            currentKeyValue.KeyValueIntCode = this.tbxKeyValueIntCode.Text.Trim();
            currentKeyValue.Description     = this.tbxKeyValueDescription.Text;
            currentKeyValue.V_Order         = BaseHelper.ConvertToInt(this.tbxKeyValueOrder.Text.Trim());

            currentKeyValue.DefaultValue1 = this.tbxDefaultValue1.Text.Trim();
            currentKeyValue.DefaultValue2 = this.tbxDefaultValue2.Text.Trim();
            currentKeyValue.DefaultValue3 = this.tbxDefaultValue3.Text.Trim();
            currentKeyValue.DefaultValue4 = this.tbxDefaultValue4.Text.Trim();
            currentKeyValue.DefaultValue5 = this.tbxDefaultValue5.Text.Trim();
            currentKeyValue.DefaultValue6 = this.tbxDefaultValue6.Text.Trim();
            //currentKeyValue.CodeAdminUNI = this.tbxCodeAdminUNI.Text.Trim();


            currentKeyValue.idKeyType = Int32.Parse(this.hdnRowMasterKey.Value);

            ETEMModel.Helpers.CallContext resultContext = this.ownerPage.AdminClientRef.KeyValueSave(currentKeyValue);

            this.lbResultKeyValueContext.Text = resultContext.Message;
            this.hdnRowSlaveKey.Value         = resultContext.EntityID;


            LoadKeyValues(currentKeyValue.idKeyType.ToString());



            currentCallerDropDownList = this.ownerPage.FindControl(this.hdnCurrentCallerDropDownListUniqueID.Value) as SMCDropDownList;

            if (this.currentCallerDropDownList != null)
            {
                currentCallerDropDownList.UserControlLoad();
                currentCallerDropDownList.SelectedValue = resultContext.EntityID;
            }

            this.ownerPage.ReloadKeyValueInApplication();
        }
コード例 #3
0
ファイル: KeyType.ascx.cs プロジェクト: borisov90/Projects
        protected void lnkBtnServerEditSlave_Click(object sender, EventArgs e)
        {

            this.pnlKeyValue.Visible = true;
            this.lbResultContext.Text = "";
            LinkButton lnkBtnServerEditSlave = sender as LinkButton;

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

            this.currentKeyValue = this.ownerPage.AdminClientRef.GetKeyValueByKeyValueID(idRowSlaveKey);

            if (currentKeyValue != null)
            {
                this.tbxKeyValueNameBG.Text = currentKeyValue.Name;
                this.tbxKeyValueNameEN.Text = currentKeyValue.NameEN;
                this.tbxKeyValueIntCode.Text = currentKeyValue.KeyValueIntCode;
                this.tbxKeyValueDescription.Text = currentKeyValue.Description;
                this.tbxKeyValueOrder.Text = (currentKeyValue.V_Order.HasValue ? currentKeyValue.V_Order.Value.ToString() : string.Empty);
                this.tbxDefaultValue1.Text = currentKeyValue.DefaultValue1;
                this.tbxDefaultValue2.Text = currentKeyValue.DefaultValue2;
                this.tbxDefaultValue3.Text = currentKeyValue.DefaultValue3;
                this.tbxDefaultValue4.Text = currentKeyValue.DefaultValue4;
                this.tbxDefaultValue5.Text = currentKeyValue.DefaultValue5;
                this.tbxDefaultValue6.Text = currentKeyValue.DefaultValue6;
                //this.tbxCodeAdminUNI.Text = currentKeyValue.CodeAdminUNI;

            }

            this.hdnRowSlaveKey.Value = this.currentKeyValue.idKeyValue.ToString();


        }
コード例 #4
0
ファイル: KeyType.ascx.cs プロジェクト: borisov90/Projects
        protected void btnSaveKeyValue_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(this.hdnRowSlaveKey.Value))
            {
                this.currentKeyValue = new ETEMModel.Models.KeyValue();
            }
            else
            {
                this.currentKeyValue = this.ownerPage.AdminClientRef.GetKeyValueByKeyValueID(this.hdnRowSlaveKey.Value);

                if (this.currentKeyValue == null)
                {
                    this.lbResultContext.Text = String.Format(BaseHelper.GetCaptionString("Entity_KeyValue_Not_Found_By_ID"), this.hdnRowSlaveKey.Value);
                    this.ownerPage.FormLoad();
                    return;
                }

            }


            currentKeyValue.Name = this.tbxKeyValueNameBG.Text.Trim();
            currentKeyValue.NameEN = this.tbxKeyValueNameEN.Text.Trim();
            currentKeyValue.KeyValueIntCode = this.tbxKeyValueIntCode.Text.Trim();
            currentKeyValue.Description = this.tbxKeyValueDescription.Text;
            currentKeyValue.V_Order = BaseHelper.ConvertToInt(this.tbxKeyValueOrder.Text.Trim());

            currentKeyValue.DefaultValue1 = this.tbxDefaultValue1.Text.Trim();
            currentKeyValue.DefaultValue2 = this.tbxDefaultValue2.Text.Trim();
            currentKeyValue.DefaultValue3 = this.tbxDefaultValue3.Text.Trim();
            currentKeyValue.DefaultValue4 = this.tbxDefaultValue4.Text.Trim();
            currentKeyValue.DefaultValue5 = this.tbxDefaultValue5.Text.Trim();
            currentKeyValue.DefaultValue6 = this.tbxDefaultValue6.Text.Trim();
            //currentKeyValue.CodeAdminUNI = this.tbxCodeAdminUNI.Text.Trim();


            currentKeyValue.idKeyType = Int32.Parse(this.hdnRowMasterKey.Value);

            ETEMModel.Helpers.CallContext resultContext = this.ownerPage.AdminClientRef.KeyValueSave(currentKeyValue);

            this.lbResultKeyValueContext.Text = resultContext.Message;
            this.hdnRowSlaveKey.Value = resultContext.EntityID;


            LoadKeyValues(currentKeyValue.idKeyType.ToString());




            currentCallerDropDownList = this.ownerPage.FindControl(this.hdnCurrentCallerDropDownListUniqueID.Value) as SMCDropDownList;

            if (this.currentCallerDropDownList != null)
            {
                currentCallerDropDownList.UserControlLoad();
                currentCallerDropDownList.SelectedValue = resultContext.EntityID;
            }

            this.ownerPage.ReloadKeyValueInApplication();


        }