private void AddAssetForm_Load(object sender, EventArgs e)
 {
     AssetCode_txt.Select();
     if (vo.AssetId > 0)
     {
         AssetCode_txt.Text              = vo.AssetCode;
         (AssetNo_txt.Text)              = vo.AssetNo.ToString();
         AssetName_txt.Text              = vo.AssetName;
         AssetModel_txt.Text             = vo.AssetModel;
         AssetSupplier_txt.Text          = vo.AssetSuppiler;
         AssetType_txt.Text              = vo.AssetType;
         AssetInvoice_txt.Text           = vo.AssetInvoice;
         AssetSerial_txt.Text            = vo.AssetSerial;
         (AssetLife_txt.Text)            = vo.AssetLife.ToString();
         Asset_Acquistion_Cost_txt.Text  = vo.AcquistionCost.ToString();
         Asset_Acquistion_Date_dtp.Value = vo.AcquistionDate;
         AssetCode_txt.Enabled           = false;
         AssetType_txt.Enabled           = false;
         this.TitleText = Com.Nidec.Mes.GlobalMasterMaintenance.CommonConstants.MODE_UPDATE;
     }
     else
     {
         this.TitleText = Com.Nidec.Mes.GlobalMasterMaintenance.CommonConstants.MODE_ADD;
     }
 }
Exemple #2
0
        private void Clear_btn_Click(object sender, EventArgs e)
        {
            AssetCode_txt.Text = string.Empty;

            AssetName_txt.Text = string.Empty;

            AssetDetails_dgv.DataSource = null;

            AssetCode_txt.Select();
        }
Exemple #3
0
        private void AddAssetForm_Load(object sender, EventArgs e)
        {
            AssetCode_txt.Select();
            if (vo.AssetId > 0)
            {
                AssetCode_txt.Text              = vo.AssetCode;
                (AssetNo_txt.Text)              = vo.AssetNo.ToString();
                AssetName_txt.Text              = vo.AssetName;
                AssetModel_txt.Text             = vo.AssetModel;
                AssetSupplier_txt.Text          = vo.AssetSuppiler;
                AssetType_txt.Text              = vo.AssetType;
                AssetInvoice_txt.Text           = vo.AssetInvoice;
                Asset_PO_txt.Text               = vo.AssetPO;
                AssetSerial_txt.Text            = vo.AssetSerial;
                (AssetLife_txt.Text)            = vo.AssetLife.ToString();
                Asset_Acquistion_Cost_txt.Text  = vo.AcquistionCost.ToString();
                Asset_Acquistion_Date_dtp.Value = vo.AcquistionDate;
                AssetCode_txt.Enabled           = false;
                AssetType_txt.Enabled           = false;

                switch (vo.LabelStatus)
                {
                case "Pasted":
                    Pasted_rdb.Checked = true;
                    break;

                case "Not Paste":
                    NotPaste_rdb.Checked = true;
                    break;

                default:
                    CannotPaste_rdb.Checked = true;
                    break;
                }

                this.TitleText = Com.Nidec.Mes.GlobalMasterMaintenance.CommonConstants.MODE_UPDATE;
            }
            else
            {
                this.TitleText = Com.Nidec.Mes.GlobalMasterMaintenance.CommonConstants.MODE_ADD;
            }
        }