コード例 #1
0
        /// <summary>
        /// form load, loads item data
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void AddStockLocationForm_Load(object sender, EventArgs e)
        {
            if (!this.DesignMode)
            {
                StockLocationCode_txt.Select();

                LoadUnityType();
                LoadLocationType();

                if (string.Equals(mode, CommonConstants.MODE_UPDATE))
                {
                    LoadUserData(updateData);

                    StockLocationCode_txt.Enabled = false;

                    StockLocationName_txt.Select();

                    var resourceMngr = new ResourceManager(this.GetType());
                    this.Text = resourceMngr.GetString("UpdateForm");
                }
                else
                {
                    StockLocationVo outVo = (StockLocationVo)base.InvokeCbm(new GetDisplayOrderNextValForStockLocCbm(), null, false);
                    if (outVo != null)
                    {
                        DisplayOrder_txt.Text = outVo.DisplayOrder.ToString();
                    }
                    else
                    {
                        DisplayOrder_txt.Text = "1";
                    }
                }
            }
        }