구매 0 달러단가 넣기 전 백업
This commit is contained in:
106
SubProject/FPJ0000/Util.cs
Normal file
106
SubProject/FPJ0000/Util.cs
Normal file
@@ -0,0 +1,106 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FPJ0000
|
||||
{
|
||||
public static class Util
|
||||
{
|
||||
public static void openjobreportitem(int idx)
|
||||
{
|
||||
//업무일지 관려 ㄴ폴더 열기 -- 210708
|
||||
OpenPath("JobReportItem", idx.ToString());
|
||||
}
|
||||
public static void openEboarditemPath(int idx)
|
||||
{
|
||||
//전자시 ㄹ업무일지 관련 폴더 열긴 -- 210708
|
||||
OpenPath("EBoardJobItem", idx.ToString());
|
||||
}
|
||||
|
||||
static void OpenPath(string group, string dataidx, Boolean openexplore = false)
|
||||
{
|
||||
//전자시 ㄹ업무일지 관련 폴더 열긴 -- 210708
|
||||
|
||||
var serverpath = System.IO.Path.Combine(FCOMMON.info.datapath, "Data", group);
|
||||
if (System.IO.Directory.Exists(serverpath) == false)
|
||||
{
|
||||
try
|
||||
{
|
||||
System.IO.Directory.CreateDirectory(serverpath);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
FCOMMON.Util.MsgE("기본 폴더 를 생성하지 못했습니다\n" + ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
var path = System.IO.Path.Combine(serverpath, dataidx);
|
||||
if (System.IO.Directory.Exists(path) == false)
|
||||
{
|
||||
try
|
||||
{
|
||||
System.IO.Directory.CreateDirectory(path);
|
||||
|
||||
//string[] subdir = new string[] { "Source", "Document", "Draw", "Estimate" };
|
||||
//foreach (var dir in subdir)
|
||||
// System.IO.Directory.CreateDirectory(path + "\\" + dir);
|
||||
|
||||
}
|
||||
catch (Exception eX)
|
||||
{
|
||||
FCOMMON.Util.MsgE("저장소 생성실패\n" + eX.Message);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (openexplore)
|
||||
FCOMMON.Util.RunExplorer(path);
|
||||
else
|
||||
{
|
||||
var f = new FCOMMON.fFileExplorer(path);
|
||||
f.ShowDialog();
|
||||
}
|
||||
}
|
||||
|
||||
public static void OpenProjectPath(string tbPath)
|
||||
{
|
||||
if (tbPath.StartsWith("\\") == false)
|
||||
{
|
||||
if (tbPath.StartsWith("/")) tbPath = tbPath.Replace("/", "\\");
|
||||
else tbPath = "\\" + tbPath;
|
||||
}
|
||||
//\\10.131.32.29\Data
|
||||
var serverpath = System.IO.Path.Combine(FCOMMON.info.datapath, "Data", "Project");
|
||||
if (System.IO.Directory.Exists(serverpath) == false)
|
||||
{
|
||||
FCOMMON.Util.MsgE("프로젝트 기본경로가 존재하지 않아 진행할 수 없습니다\n\n" +
|
||||
serverpath);
|
||||
return;
|
||||
}
|
||||
|
||||
var path = serverpath + tbPath;
|
||||
if (System.IO.Directory.Exists(path) == false)
|
||||
{
|
||||
try
|
||||
{
|
||||
System.IO.Directory.CreateDirectory(path);
|
||||
|
||||
string[] subdir = new string[] { "Source", "Document", "Draw", "Estimate" };
|
||||
foreach (var dir in subdir)
|
||||
System.IO.Directory.CreateDirectory(path + "\\" + dir);
|
||||
|
||||
}
|
||||
catch (Exception eX)
|
||||
{
|
||||
FCOMMON.Util.MsgE("프로젝트 저장소 생성실패\n" + eX.Message);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
FCOMMON.Util.RunExplorer(path);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user