Пример #1
0
        private static void CreateFiles(Template T)
        {
            ODMSetting ODMSetting = Context.ODMSettingRepository.FindBy(x => x.SettingName == "WORKING_DIR").FirstOrDefault();

            GenerateFiles.GeneratePARFile(ODMSetting.SettingValue + '\\' + T.PARFileName.ToString(), T.Id.ToString());
            GenerateFiles.GenerateBATFile(ODMSetting.SettingValue + '\\' + T.BATFileName.ToString(), T.Id.ToString());
            Utility.ExecuteAsAdmin(ODMSetting.SettingValue + '\\' + T.BATFileName.ToString());
        }
Пример #2
0
        private void rgvTemplate_cmdGeneratePAR_CommandCellClick(object sender, EventArgs e)
        {
            gridTimer.Enabled = true;
            GridViewCellEventArgs args       = (GridViewCellEventArgs)e;
            ODMSetting            ODMSetting = Context.ODMSettingRepository.FindBy(x => x.SettingName == "WORKING_DIR").FirstOrDefault();
            Template tmpl = Context.TemplateRepository.FindBy(x => x.Id == args.Value.ToString()).FirstOrDefault();

            GenerateFiles.GeneratePARFile(ODMSetting.SettingValue + '\\' + tmpl.PARFileName.ToString(), args.Value.ToString());
            GenerateFiles.GenerateBATFile(ODMSetting.SettingValue + '\\' + tmpl.BATFileName.ToString(), args.Value.ToString());
            Utility.ExecuteAsAdmin(ODMSetting.SettingValue + '\\' + tmpl.BATFileName.ToString());
        }