/* public ResultMessage UploadFile(string Nombre, string Usuario, string Equipo, string Ip)//, string Fecha, string Extencion,string TransaccionId, int TablaId, string NroOperacion, string Archivo) * {*/ // HttpContext request = HttpContext.Current; public ResultMessage UploadFile(ParameterFileType ParameterFile) { ResultMessage result = new ResultMessage { }; try { //ParameterFileType param = new ParameterFileType(); IIdentity winid = HttpContext.Current.User.Identity; WindowsIdentity wi = (WindowsIdentity)winid; NameValueCollection varServer = HttpContext.Current.Request.ServerVariables; ParameterFile.Usuario = varServer["HTTP_QVUSER"];// wi.Name; SharedFileMananger shared = new SharedFileMananger(); result = shared.CreateFiles(ParameterFile); //return new ResultMessage { Status ="", Sta tusBody = new ErrorMessage { Code ="o", Message ="oksks"} };// result; return(result); } catch (Exception ex) { result = new ResultMessage { Status = "ERROR", StatusBody = new ErrorMessage { Code = "501", Message = "Message Exception:.." + ex.Message } }; } return(result); }
/* ----------------------------------------------------------------- */ /// /// Load /// /// <summary> /// ファイルからデータをロードする. /// NOTE: 現在サポートしているファイル形式は XML のみ. /// </summary> /// /* ----------------------------------------------------------------- */ public void Load(string path, ParameterFileType filetype) { switch (filetype) { case ParameterFileType.XML: var doc = new XmlDocument(); doc.Load(path); this.Load(doc); break; default: throw new NotSupportedException(filetype.ToString()); } }