public ResultMessage GenerateCTS(string Semestre, string Periodo, string ImpTc, string CodigoPer, string Fecha, int TablaId) { PlanillasManager shared = new PlanillasManager(Semestre, Periodo, ImpTc, CodigoPer, Fecha, TablaId); IIdentity winid = HttpContext.Current.User.Identity; WindowsIdentity wi = (WindowsIdentity)winid; return(shared.GenerateCTS(wi.Name)); // return new ResultMessage { Status = "", StatusBody = new ErrorMessage { Code = "o", Message = "oksks" } }; }
public ResultMessage GenerateTicket(string param1, string param2, string param3, string param4, string param5, int param6, string param7, string param8) { // public ResultMessage GenerateTicket(string CodigoPer,string CodigoPlla,string TipoPlla,string Mes,string Periodo,int TablaId, string Fecha) { // string CodigoPer,string CodigoPlla,string TipoPlla,string Mes,string Periodo,int TablaId, string Fecha //param8:valida la autenticacion activa del usuario PlanillasManager shared = new PlanillasManager(param1, param2, param3, param4, param5, param6, param7); // PlanillasManager shared = new PlanillasManager(CodigoPer, CodigoPlla, TipoPlla, Mes, Periodo, TablaId, Fecha); // shared.GenerateTikect(); ResultMessage result = new ResultMessage { }; try { IIdentity winid = HttpContext.Current.User.Identity; string Logo = HttpContext.Current.Server.MapPath("~/Images/logo.png"); string BarTitle = HttpContext.Current.Server.MapPath("~/Images/bar.png"); string signature = HttpContext.Current.Server.MapPath("~/Images/signature.txt"); NameValueCollection varServer = HttpContext.Current.Request.ServerVariables; // byte[] Files = File.ReadAllBytes(firma); // string text = System.IO.File.ReadAllText(@"C:\Users\Public\TestFolder\WriteText.txt"); //string Base64String = Convert.ToBase64String(Files, 0, Files.Length); // ParameterFile.Usuario = varServer["HTTP_QVUSER"];// wi.Name; WindowsIdentity wi = (WindowsIdentity)winid; // result= shared.GenerateTikect(varServer["HTTP_QVUSER"]); result = shared.GenerateTikect(param8, Logo, BarTitle, signature); } catch (Exception ex) { result = new ResultMessage { Status = "ERROR", StatusBody = new ErrorMessage { Code = "501", Message = "Message Exception:.." + ex.Message } }; } // param8 = wi.Name; return(result); // new ResultMessage { Status = "", StatusBody = new ErrorMessage { Code = "o", Message = "oksks" } }; }