public void InitModule(string id) { try { //dsoFramerWordControl1.FileNew(); LayoutType lt1 = Services.BaseService.GetOneByKey<LayoutType>(id); if (lt1 == null) { lt1 = new LayoutType(); LayoutType lt2 = Services.BaseService.GetOneByKey<LayoutType>("LayoutModule"); lt1.UID = id; Services.BaseService.Create<LayoutType>(lt1); } fb = lt1.ExcelData; } catch { } }
private void SaveData() { WaitDialogForm wait = null; LayoutType lt = Services.BaseService.GetOneByKey<LayoutType>(type); try { wait = new WaitDialogForm("", "���ڱ�������, ���Ժ�..."); if (lt != null) { lt.ExcelData = dsoFramerWordControl1.FileDataGzip; Services.BaseService.Update<LayoutType>(lt); } else { lt = new LayoutType(); lt.UID = type; lt.ExcelData = dsoFramerWordControl1.FileDataGzip; Services.BaseService.Create<LayoutType>(lt); } issave = true; if (frc != null) frc.InitModule(type); if (flc != null) flc.InitModule(type); wait.Close(); } catch (Exception exc) { Debug.Fail(exc.Message); HandleException.TryCatch(exc); wait.Close(); return; } }