예제 #1
0
        private void cmsiEditMaterial_Click(object sender, EventArgs e)
        {
            DlgEditBusinessMaterial dlg = new DlgEditBusinessMaterial();

            dlg.Material = BusinessServcie.GetBusinessMaterial(CurrMaterial.ID);
            if (DialogResult.OK == dlg.ShowDialog())
            {
                try
                {
                    BusinessServcie.SaveBusinessMaterial(dlg.Material);
                    RefreshBusinessTree();
                    MainForm.INFO("编辑业务材料成功!");
                }
                catch (Exception ex)
                {
                    MainForm.ERROR("编辑业务材料失败!" + ex.Message);
                }
            }
        }
예제 #2
0
        private void cmsiAddMaterial_Click(object sender, EventArgs e)
        {
            SYS_BUSINESSMATERIAL newMaterial = new SYS_BUSINESSMATERIAL();

            newMaterial.CREATETIME      = DateTime.Now;
            newMaterial.REF_BUSINESS_ID = CurrBusiness.ID;
            DlgEditBusinessMaterial dlg = new DlgEditBusinessMaterial();

            dlg.Material = newMaterial;
            if (DialogResult.OK == dlg.ShowDialog())
            {
                try
                {
                    BusinessServcie.SaveBusinessMaterial(dlg.Material);
                    RefreshBusinessTree();
                    MainForm.INFO("添加业务材料成功!");
                }
                catch (Exception ex)
                {
                    MainForm.ERROR("添加业务材料失败!" + ex.Message);
                }
            }
        }