private void LoadInfo()
        {
            var Material = _MaterialRepo.GetById(id);

            if (Material != null)
            {
                txtName.Value         = Material.NAME;
                txtNote.Value         = Material.NOTE;
                ddlUnit.SelectedValue = Utils.CStrDef(Material.UNIT_ID);
            }
        }
        public string getNameMaterial(object materialId)
        {
            int _id      = Utils.CIntDef(materialId);
            var Material = _MaterialRepo.GetById(_id);

            if (Material != null)
            {
                return(Material.NAME);
            }
            return("");
        }
Exemple #3
0
        protected void ddlMaterial_SelectedIndexChanged(object sender, EventArgs e)
        {
            int _id      = Utils.CIntDef(ddlMaterial.SelectedValue);
            var Material = _MaterialRepo.GetById(_id);

            if (Material != null)
            {
                var Unit = _UnitRepo.GetById(Utils.CIntDef(Material.UNIT_ID));
                if (Unit != null)
                {
                    lbUnit.Text = Unit.NAME;
                }
            }
        }