Exemple #1
0
        private void SetEmptyValues()
        {
            ClearResultContext();

            this.tbxUserName.Text = string.Empty;
            this.tbxPassword.Text = string.Empty;
            this.tbxPassword.Attributes.Add("value", string.Empty);

            this.tbxAutoCompletePersonName.SelectedValue = Constants.INVALID_ID_STRING;
            this.tbxAutoCompletePersonName.Text          = string.Empty;

            BaseHelper.CheckAndSetSelectedValue(this.ddlStatus.DropDownListCTRL,
                                                this.ownerPage.GetKeyValueByIntCode(ETEMEnums.KeyTypeEnum.UserStatus.ToString(),
                                                                                    ETEMEnums.UserStatusEnum.Active.ToString()).IdEntityString,
                                                false);

            this.tbxEGN.Text            = string.Empty;
            this.tbxIdentityNumber.Text = string.Empty;
            this.tbxMail.Text           = string.Empty;

            this.tbxAutoCompleteAltPersonName.SelectedValue = Constants.INVALID_ID_STRING;
            this.tbxAutoCompleteAltPersonName.Text          = string.Empty;
            this.tbxAltPassword.Text = string.Empty;
            this.tbxAltPassword.Attributes.Add("value", string.Empty);

            this.tbxDescription.Text = string.Empty;

            this.hdnRowMasterKey.Value        = string.Empty;
            this.ddlStatus.SelectedValue      = Constants.INVALID_ID_STRING;
            this.ddlCheckDomain.SelectedValue = Constants.INVALID_ID_STRING;
        }
Exemple #2
0
        public override void UserControlLoad()
        {
            SetEmptyValues();
            base.ClearResultContext(this.lbResultContext);

            if (this.ownerPage == null)
            {
                throw new UMSException("Current Page is null or is not inheritor of BasicPage.");
            }

            if (!string.IsNullOrEmpty(this.hdnRowMasterKey.Value) && this.hdnRowMasterKey.Value != Constants.INVALID_ID_ZERO_STRING)
            {
                this.CurrentEntityMasterID = this.hdnRowMasterKey.Value;
            }

            InitLoadControls();

            this.currentEntity = this.ownerPage.CostCalculationRef.GetProductivityAndScrapDetailById(this.CurrentEntityMasterID);

            if (this.currentEntity != null)
            {
                this.SetHdnField(this.currentEntity.idProductivityAndScrapDetail.ToString());

                this.tbxDateFrom.SetTxbDateTimeValue(this.currentEntity.ProductivityAndScrap.DateFrom);
                this.tbxDateTo.SetTxbDateTimeValue(this.currentEntity.ProductivityAndScrap.DateTo);
                this.tbxStatus.Text = this.currentEntity.ProductivityAndScrap.Status;

                BaseHelper.CheckAndSetSelectedValue(this.ddlCostCenter.DropDownListCTRL, this.currentEntity.idCostCenter.ToString(), false);
                BaseHelper.CheckAndSetSelectedValue(this.ddlProfileSetting.DropDownListCTRL, this.currentEntity.idProfileSetting.ToString(), false);

                this.tbxSumOfHours.Text       = this.currentEntity.SumOfHours_RoundString;
                this.tbxSumOfConsumption.Text = this.currentEntity.SumOfConsumption_RoundString;
                this.tbxSumOfProduction.Text  = this.currentEntity.SumOfProduction_RoundString;

                this.tbxProductivityKGh.Text = this.currentEntity.ProductivityKGh_RoundString;
                this.tbxScrapRate.Text       = this.currentEntity.ScrapRatePercent_RoundString;

                base.ClearResultContext(this.lbResultContext);
            }
            else
            {
                SetEmptyValues();
            }

            this.pnlFormData.Visible = true;
            this.pnlFormData.Focus();
        }
Exemple #3
0
        public override void UserControlLoad()
        {
            SetEmptyValues();
            base.ClearResultContext(this.lbResultContext);

            if (this.ownerPage == null)
            {
                throw new UMSException("Current Page is null or is not inheritor of BasicPage.");
            }

            if (!string.IsNullOrEmpty(this.hdnRowMasterKey.Value) && this.hdnRowMasterKey.Value != Constants.INVALID_ID_ZERO_STRING)
            {
                this.CurrentEntityMasterID = this.hdnRowMasterKey.Value;
            }

            InitLoadControls();

            this.currentEntity = this.ownerPage.CostCalculationRef.GetDiePriceListById(this.CurrentEntityMasterID);

            if (this.currentEntity != null)
            {
                this.SetHdnField(this.currentEntity.idDiePriceList.ToString());

                BaseHelper.CheckAndSetSelectedValue(this.ddlVendor.DropDownListCTRL, this.currentEntity.idVendor.ToString(), false);
                this.tbxDateFrom.SetTxbDateTimeValue(this.currentEntity.DateFrom);
                this.tbxDateTo.SetTxbDateTimeValue(this.currentEntity.DateTo);

                this.btnImportPriceListDetails.Enabled = true;

                if (this.currentEntity.DiePriceListDetails != null && this.currentEntity.DiePriceListDetails.Count > 0)
                {
                    this.ddlVendor.DropDownEnabled         = false;
                    this.tbxDateFrom.ReadOnly              = true;
                    this.btnImportPriceListDetails.Enabled = false;
                }

                base.ClearResultContext(this.lbResultContext);
            }
            else
            {
                SetEmptyValues();
            }

            this.pnlFormData.Visible = true;
            this.pnlFormData.Focus();
        }
Exemple #4
0
        public override void UserControlLoad()
        {
            SetEmptyValues();
            base.ClearResultContext(this.lbResultContext);

            if (this.ownerPage == null)
            {
                throw new UMSException("Current Page is null or is not inheritor of BasicPage.");
            }

            if (!string.IsNullOrEmpty(this.hdnRowMasterKey.Value) && this.hdnRowMasterKey.Value != Constants.INVALID_ID_ZERO_STRING)
            {
                this.CurrentEntityMasterID = this.hdnRowMasterKey.Value;
            }

            InitLoadControls();

            this.currentEntity = this.ownerPage.CostCalculationRef.GetSAPDataQuantityById(this.CurrentEntityMasterID);

            if (this.currentEntity != null)
            {
                this.SetHdnField(this.currentEntity.idSAPDataQuantity.ToString());

                this.tbxDateFrom.SetTxbDateTimeValue(this.currentEntity.SAPData.DateFrom);
                this.tbxDateTo.SetTxbDateTimeValue(this.currentEntity.SAPData.DateTo);
                this.tbxStatus.Text = this.currentEntity.SAPData.Status;

                BaseHelper.CheckAndSetSelectedValue(this.ddlCostCenter.DropDownListCTRL, this.currentEntity.idCostCenter.ToString(), false);
                BaseHelper.CheckAndSetSelectedValue(this.ddlQuantityType.DropDownListCTRL, this.currentEntity.idQuantityType.ToString(), false);

                this.tbxValueData.Text = this.currentEntity.ValueDataRoundString;

                base.ClearResultContext(this.lbResultContext);
            }
            else
            {
                SetEmptyValues();
            }

            this.pnlFormData.Visible = true;
            this.pnlFormData.Focus();
        }
Exemple #5
0
        public override void UserControlLoad()
        {
            SetEmptyValues();
            base.ClearResultContext(this.lbResultContext);

            if (this.ownerPage == null)
            {
                throw new UMSException("Current Page is null or is not inheritor of BasicPage.");
            }

            if (!string.IsNullOrEmpty(this.hdnRowMasterKey.Value) && this.hdnRowMasterKey.Value != Constants.INVALID_ID_ZERO_STRING)
            {
                this.CurrentEntityMasterID = this.hdnRowMasterKey.Value;
            }

            InitLoadControls();

            this.currentEntity = this.ownerPage.CostCalculationRef.GetDiePriceListDetailById(this.CurrentEntityMasterID);

            if (this.currentEntity != null)
            {
                this.SetHdnField(this.currentEntity.idDiePriceListDetail.ToString());

                BaseHelper.CheckAndSetSelectedValue(this.ddlVendor.DropDownListCTRL, this.currentEntity.idDiePriceList.ToString(), false);
                BaseHelper.CheckAndSetSelectedValue(this.ddlNumberOfCavities.DropDownListCTRL, this.currentEntity.idNumberOfCavities.ToString(), false);
                BaseHelper.CheckAndSetSelectedValue(this.ddlProfileCategory.DropDownListCTRL, this.currentEntity.idProfileCategory.ToString(), false);
                BaseHelper.CheckAndSetSelectedValue(this.ddlProfileComplexity.DropDownListCTRL, this.currentEntity.idProfileComplexity.ToString(), false);
                this.tbxDimensionA.Text = this.currentEntity.DimensionA_String;
                this.tbxDimensionB.Text = this.currentEntity.DimensionB_String;
                this.tbxDiePrice.Text   = this.currentEntity.PriceRoundString;
                this.tbxLifespan.Text   = this.currentEntity.LifespanRoundString;

                base.ClearResultContext(this.lbResultContext);
            }
            else
            {
                SetEmptyValues();
            }

            this.pnlFormData.Visible = true;
            this.pnlFormData.Focus();
        }
Exemple #6
0
        public override void UserControlLoad()
        {
            if (this.ownerPage == null)
            {
                throw new UMSException("Current Page is null or is not inheritor of BasicPage.");
            }

            InitLoadControls();

            SetEmptyValues();

            if (!string.IsNullOrEmpty(this.hdnRowMasterKey.Value) && this.hdnRowMasterKey.Value != Constants.INVALID_ID_STRING)
            {
                this.CurrentEntityMasterID = this.hdnRowMasterKey.Value;
            }

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

            if (this.currentEntity != null)
            {
                this.tbxUserName.Text = this.currentEntity.UserName;

                this.tbxPassword.Attributes.Add("value", BaseHelper.Decrypt(System.Web.HttpUtility.UrlDecode(this.currentEntity.Password)));
                this.tbxPassword.Text = ETEMModel.Helpers.BaseHelper.Decrypt(System.Web.HttpUtility.UrlDecode(this.currentEntity.Password));

                Person person = this.ownerPage.AdminClientRef.GetPersonByPersonID(this.currentEntity.idPerson.ToString());
                if (person != null)
                {
                    this.tbxAutoCompletePersonName.Text          = person.FullName;
                    this.tbxAutoCompletePersonName.SelectedValue = person.idPerson.ToString();

                    this.tbxEGN.Text            = person.EGN;
                    this.tbxIdentityNumber.Text = person.IdentityNumber;
                    this.tbxMail.Text           = person.EMail;
                }

                BaseHelper.CheckAndSetSelectedValue(this.ddlStatus.DropDownListCTRL, this.currentEntity.idStatus, false);
                BaseHelper.CheckAndSetSelectedValue(this.ddlCheckDomain.DropDownListCTRL, this.currentEntity.idCheckDomain, false);

                if (this.currentEntity.idAltPerson.HasValue)
                {
                    Person altPerson = this.ownerPage.AdminClientRef.GetPersonByPersonID(this.currentEntity.idAltPerson.Value.ToString());
                    if (altPerson != null)
                    {
                        this.tbxAutoCompleteAltPersonName.Text          = altPerson.FullName;
                        this.tbxAutoCompleteAltPersonName.SelectedValue = altPerson.idPerson.ToString();
                    }
                }

                this.tbxAltPassword.Attributes.Add("value", BaseHelper.Decrypt(System.Web.HttpUtility.UrlDecode(this.currentEntity.AltPassword)));
                this.tbxAltPassword.Text = ETEMModel.Helpers.BaseHelper.Decrypt(System.Web.HttpUtility.UrlDecode(this.currentEntity.AltPassword));


                this.tbxDescription.Text = this.currentEntity.Description;

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

                ClearResultContext();
            }
            else
            {
                SetEmptyValues();
            }
        }