Beispiel #1
0
        protected override void AddObject()
        {
            CodeEditWindow form = new CodeEditWindow(2, CharacterCasing.Upper, false);
            form.FormClosed += (o, e) =>
            {
                if (form.DialogResult == System.Windows.Forms.DialogResult.OK)
                {
                    T_MaterailType matType = new T_MaterailType() { Code = form.Code, Desc = form.Desc };
                    _Proxy.AddMatType(matType);
                    this.gvCode.RefreshData();
                }
            };

            form.ShowDialog();
        }
Beispiel #2
0
 public void UpdateMatType(T_MaterailType matType)
 {
     MatTypeList.Remove(MatTypeList.Find(o => o.Code == matType.Code));
     MatTypeList.Add(matType);
 }
Beispiel #3
0
        private void InitMatTypeList()
        {
            MatTypeList = new List<T_MaterailType>();

            T_MaterailType codeA = new T_MaterailType() { Code = "TA", Desc = "类型A" };
            T_MaterailType codeB = new T_MaterailType() { Code = "TB", Desc = "类型B" };
            T_MaterailType codeC = new T_MaterailType() { Code = "TC", Desc = "类型C" };
            T_MaterailType codeD = new T_MaterailType() { Code = "TD", Desc = "类型D" };
            T_MaterailType codeE = new T_MaterailType() { Code = "TE", Desc = "类型E" };
            T_MaterailType codeF = new T_MaterailType() { Code = "TF", Desc = "类型F" };

            MatTypeList.Add(codeA);
            MatTypeList.Add(codeB);
            MatTypeList.Add(codeC);
            MatTypeList.Add(codeD);
            MatTypeList.Add(codeE);
            MatTypeList.Add(codeF);
        }
Beispiel #4
0
 public void AddMatType(T_MaterailType matType)
 {
     MatTypeList.Add(matType);
 }