示例#1
0
        public void NewTemplate()
        {
            // using (frmPlanProtTemplateSetup Template = new frmPlanProtTemplateSetup { formAction = currentAction.caAdd,theSystemDBTag = this.theSystemDBTag, UserCurrentInfo = this.UserCurrentInfo  })
            frmPlanProtTemplateSetup Template = new frmPlanProtTemplateSetup {
                formAction = currentAction.caAdd, theSystemDBTag = this.theSystemDBTag, UserCurrentInfo = this.UserCurrentInfo
            };

            // {
            Template.UserCurrentInfo = this.UserCurrentInfo;

            OnSendControlToMainTab(new SendControlToMainTabHandlerArgs(Template, "New Template", UserCurrentInfo, false));
            // }

            // LoadTemplateList();
        }
示例#2
0
        public void EditTemplate()
        {
            //using (frmPlanProtTemplateSetup Template = new frmPlanProtTemplateSetup {
            //    formAction = currentAction.caEdit, theSystemDBTag = this.theSystemDBTag, UserCurrentInfo = this.UserCurrentInfo  ,
            //    TempID = Convert.ToInt32(tableTemplate.Rows[viewTemlates.FocusedRowHandle]["TemplateID"].ToString()) })
            frmPlanProtTemplateSetup Template = new frmPlanProtTemplateSetup {
                formAction = currentAction.caEdit, theSystemDBTag = this.theSystemDBTag, UserCurrentInfo = this.UserCurrentInfo, templateData = this.templateData,
                TempID     = Convert.ToInt32(templateData.TemplateList.Rows[viewTemlates.FocusedRowHandle]["TemplateID"].ToString())
            };

            // {
            Template.UserCurrentInfo = this.UserCurrentInfo;
            Template.tabCaption      = "Edit Template " + templateData.TemplateList.Rows[viewTemlates.FocusedRowHandle]["TemplateName"].ToString();
            Template.CloseTab       += Template_CloseTab;
            OnSendControlToMainTab(new SendControlToMainTabHandlerArgs(Template, "Edit Template " + templateData.TemplateList.Rows[viewTemlates.FocusedRowHandle]["TemplateName"].ToString(), UserCurrentInfo, false));
            //}

            // LoadTemplateList();
        }