コード例 #1
0
        public logicmanager(service.connectnetworkservice _conn)
        {
            _logic_conn = _conn;

            callLogicCallback_argv_set = new Dictionary<string, ArrayList>();
            connect_logicproxy = new Dictionary<juggle.Ichannel, logicproxy>();
            logics = new Dictionary<string, Tuple<string, short>>();
            lgoicproxys = new Dictionary<string, logicproxy>();
        }
コード例 #2
0
        public gatemanager(service.connectnetworkservice _conn)
        {
            _gate_conn = _conn;
            current_client_uuid = "";

            clients = new Dictionary<string, gateproxy>();
            ch_gateproxys = new Dictionary<juggle.Ichannel, gateproxy>();
            gates = new Dictionary<string, gateproxy>();
        }
コード例 #3
0
 /// <summary>
 /// Invoked when <see cref="ToDTO"/> operation is about to return.
 /// </summary>
 /// <param name="dto"><see cref="serviceDto"/> converted from <see cref="service"/>.</param>
 static partial void OnDTO(this service entity, serviceDto dto);
コード例 #4
0
 MoveTypeOperationKind.RenameFile => new RenameFileEditor(service, state, fileName, cancellationToken),
コード例 #5
0
 : super(service, ServiceErrorHandling.ThrowOnError)
コード例 #6
0
 static public long ServicesToDB(this service service, string description, DateTime start, DateTime stop, int code)
 {
     return(((int?)service).ServicesToDB(description, start, stop, code));
 }
コード例 #7
0
 public static void InformationToEvent(this string log, service service, eventID eventID)
 {
     log.InformationToEvent((service == service.Null ? (int?)null : (int)service), (eventID == eventID.Null ? (int?)null : (int)eventID));
 }
コード例 #8
0
 public static void EventLog(this string events, string status, service service, eventID eventID)
 {
     events.EventLog(status, service, eventID, _eLogEvent, _dbLogEvent, _fLogEvent);
 }
コード例 #9
0
 public void setDefaultLoc()
 {
     try
     {
         IDictionary dict = null;
         if (HttpContext.Current.Session != null && HttpContext.Current.Session["AuditData"] != null)
         {
             dict = (IDictionary)HttpContext.Current.Session["AuditData"];
         }
         objServiceInfo = (ServiceInfo)HttpContext.Current.Session["serviceInfo"];
         svc = readConfig();
         string defaultLoc = svc.locationSearch.defaultLocation;
         objLocInfo = LocationInfo.getLocationInfoObj;
         if (defaultLoc != "" && defaultLoc.Split(',').Count() > 1)
         {
             if (objLocInfo.placeName == null || objLocInfo.placeName == "")
             {
                 objLocInfo.placeName = defaultLoc.Split(',')[0];
             }
             if (objLocInfo.latitude == 0.0)
             {
                 objLocInfo.latitude = Convert.ToDouble(defaultLoc.Split(',')[1]);
             }
             if (objLocInfo.longitude == 0.0)
             {
                 objLocInfo.longitude = Convert.ToDouble(defaultLoc.Split(',')[2]);
             }
             if (dict != null)
             {
                 dict["locSearchType"] = "defaultLocation";
                 HttpContext.Current.Session["AuditData"] = dict;
             }
         }
         else if ((bool)(svc.locationSearch.useIPLocation))
         {
             HttpRequest req = HttpContext.Current.Request;
             //string url = "http://api.hostip.info/get_xml.php?position=true& ip=" + (req.ServerVariables["HTTP_X_FORWARDED_FOR"] ?? req.ServerVariables["REMOTE_ADDR"]);
             string url = "http://freegeoip.net/xml/" + ( req.ServerVariables["HTTP_X_FORWARDED_FOR"] == null ? req.ServerVariables["REMOTE_ADDR"] : req.ServerVariables["HTTP_X_FORWARDED_FOR"]);
             string proxyName = ConfigurationManager.AppSettings["proxyName"];
             WebClient webClient = new WebClient();
             webClient.Encoding = Encoding.UTF8;
             string username = ConfigurationManager.AppSettings["UserName"] ?? "";
             string domain = ConfigurationManager.AppSettings["Domain"] ?? "";
             string password = ConfigurationManager.AppSettings["Password"] ?? "";
             if (username != "" && password != "")
                 webClient.Credentials = new System.Net.NetworkCredential(username, password, domain);
             webClient.Headers.Add(HttpRequestHeader.UserAgent, "test");
             WebProxy proxy = new WebProxy(proxyName, true);
             if (username != "" && password != "")
                 proxy.Credentials = new System.Net.NetworkCredential(username, password, domain);
             webClient.Proxy = proxy;
             try
             {
                 string xml = webClient.DownloadString(url);
                 XmlDocument xdoc = new XmlDocument();
                 xdoc.LoadXml(xml);
                 DataSet dsTest = new DataSet();
                 dsTest.ReadXml(new XmlNodeReader(xdoc));
                 if (dsTest != null && dsTest.Tables.Count > 0)
                 {
                     //if (dsTest.Tables.Contains("Hostip") && dsTest.Tables["Hostip"].Rows.Count > 0)
                     //{
                     //    if (dsTest.Tables["Hostip"].Rows[0]["countryAbbrev"].ToString() != "XX")
                     //    {
                     //        objLocInfo.placeName = dsTest.Tables["Hostip"].Rows[0]["name"].ToString().IndexOf(',') > 0 ? dsTest.Tables["Hostip"].Rows[0]["name"].ToString().Split(',')[0] : dsTest.Tables["Hostip"].Rows[0]["name"].ToString();
                     //        objLocInfo.CountryCode = dsTest.Tables["Hostip"].Rows[0]["countryAbbrev"].ToString();
                     //    }
                     //}
                     //if (dsTest.Tables.Contains("point") && dsTest.Tables["point"].Rows.Count > 0)
                     //{
                     //    string lnglat = dsTest.Tables["point"].Rows[0]["coordinates"].ToString();
                     //    if (lnglat != "")
                     //    {
                     //        objLocInfo.latitude = Double.Parse(lnglat.Split(',')[1].ToString());
                     //        objLocInfo.longitude = Double.Parse(lnglat.Split(',')[0].ToString());
                     //    }
                     //}
                     if (dsTest.Tables[0].Rows.Count > 0)
                     {
                         objLocInfo.placeName = dsTest.Tables[0].Rows[0]["City"].ToString();
                         objLocInfo.CountryCode = dsTest.Tables[0].Rows[0]["CountryCode"].ToString();
                         objLocInfo.latitude = Double.Parse(dsTest.Tables[0].Rows[0]["Latitude"].ToString());
                         objLocInfo.longitude = Double.Parse(dsTest.Tables[0].Rows[0]["Longitude"].ToString());
                     }
                 }
                 if (dict != null && objLocInfo.CountryCode != "")
                 {
                     dict["locSearchType"] = "UserIP";
                     HttpContext.Current.Session["AuditData"] = dict;
                 }
             }
             catch (Exception ex)
             {
                 AgriCastException currEx = new AgriCastException(GetServiceDetails(), ex);
                 AgriCastLogger.Publish(currEx, AgriCastLogger.LogType.Error);
             }
         }
     }
     catch (Exception ex)
     {
         AgriCastException currEx = new AgriCastException(GetServiceDetails(), ex);
         AgriCastLogger.Publish(currEx, AgriCastLogger.LogType.Error);
         HttpContext.Current.Session["ErrorMessage"] = util.getTransText(Constants.TOOLBAR_DEFAULTLOCATION) + " : " + ex.Message.ToString();
     }
 }
コード例 #10
0
 public static void ExceptionToEvent(this Exception ex, string log, service service)
 {
     ex.ExceptionToEvent(log, (service == service.Null ? (int?)null : (int)service), null);
 }
コード例 #11
0
 public static void ErrorLog(this string message, service service)
 {
     message.ErrorLog(service, _eLog, _dbLog, _fLog);
 }
コード例 #12
0
 public static void ErrorToFile(this string log, service service)
 {
     (GetSource(service, eventID.Null) + log).ErrorToFile();
 }
コード例 #13
0
 public static void ErrorToDB(this string log, service service)
 {
     log.ErrorToDB((service == service.Null ? (int?)null : (int)service), null);
 }
コード例 #14
0
 public static void ErrorToDB(this string log, service service, eventID eventID)
 {
     log.ErrorToDB((service == service.Null ? (int?)null : (int)service), (eventID == eventID.Null ? (int?)null : (int)eventID));
 }
コード例 #15
0
        public dbproxyproxy(service.connectnetworkservice _connect_)
        {
            _connect = _connect_;

            callback_set = new Dictionary<string, object>();
        }
コード例 #16
0
        /// <summary>
        /// Converts this instance of <see cref="serviceDto"/> to an instance of <see cref="service"/>.
        /// </summary>
        /// <param name="dto"><see cref="serviceDto"/> to convert.</param>
        public static service ToEntity(this serviceDto dto)
        {
            if (dto == null)
            {
                return(null);
            }

            var entity = new service();

            entity.v_ServiceId            = dto.v_ServiceId;
            entity.v_ProtocolId           = dto.v_ProtocolId;
            entity.v_PersonId             = dto.v_PersonId;
            entity.i_MasterServiceId      = dto.i_MasterServiceId;
            entity.i_ServiceStatusId      = dto.i_ServiceStatusId;
            entity.v_Motive               = dto.v_Motive;
            entity.i_AptitudeStatusId     = dto.i_AptitudeStatusId;
            entity.d_ServiceDate          = dto.d_ServiceDate;
            entity.d_GlobalExpirationDate = dto.d_GlobalExpirationDate;
            entity.d_ObsExpirationDate    = dto.d_ObsExpirationDate;
            entity.i_FlagAgentId          = dto.i_FlagAgentId;
            entity.v_OrganizationId       = dto.v_OrganizationId;
            entity.v_LocationId           = dto.v_LocationId;
            entity.v_MainSymptom          = dto.v_MainSymptom;
            entity.i_TimeOfDisease        = dto.i_TimeOfDisease;
            entity.i_TimeOfDiseaseTypeId  = dto.i_TimeOfDiseaseTypeId;
            entity.v_Story                            = dto.v_Story;
            entity.i_DreamId                          = dto.i_DreamId;
            entity.i_UrineId                          = dto.i_UrineId;
            entity.i_DepositionId                     = dto.i_DepositionId;
            entity.i_AppetiteId                       = dto.i_AppetiteId;
            entity.i_ThirstId                         = dto.i_ThirstId;
            entity.d_Fur                              = dto.d_Fur;
            entity.v_CatemenialRegime                 = dto.v_CatemenialRegime;
            entity.i_MacId                            = dto.i_MacId;
            entity.i_IsNewControl                     = dto.i_IsNewControl;
            entity.i_HasMedicalBreakId                = dto.i_HasMedicalBreakId;
            entity.d_MedicalBreakStartDate            = dto.d_MedicalBreakStartDate;
            entity.d_MedicalBreakEndDate              = dto.d_MedicalBreakEndDate;
            entity.v_GeneralRecomendations            = dto.v_GeneralRecomendations;
            entity.i_DestinationMedicationId          = dto.i_DestinationMedicationId;
            entity.i_TransportMedicationId            = dto.i_TransportMedicationId;
            entity.d_StartDateRestriction             = dto.d_StartDateRestriction;
            entity.d_EndDateRestriction               = dto.d_EndDateRestriction;
            entity.i_HasRestrictionId                 = dto.i_HasRestrictionId;
            entity.i_HasSymptomId                     = dto.i_HasSymptomId;
            entity.d_UpdateDate                       = dto.d_UpdateDate;
            entity.d_NextAppointment                  = dto.d_NextAppointment;
            entity.i_IsDeleted                        = dto.i_IsDeleted;
            entity.i_InsertUserId                     = dto.i_InsertUserId;
            entity.d_InsertDate                       = dto.d_InsertDate;
            entity.i_UpdateUserId                     = dto.i_UpdateUserId;
            entity.i_SendToTracking                   = dto.i_SendToTracking;
            entity.i_InsertUserMedicalAnalystId       = dto.i_InsertUserMedicalAnalystId;
            entity.i_UpdateUserMedicalAnalystId       = dto.i_UpdateUserMedicalAnalystId;
            entity.d_InsertDateMedicalAnalyst         = dto.d_InsertDateMedicalAnalyst;
            entity.d_UpdateDateMedicalAnalyst         = dto.d_UpdateDateMedicalAnalyst;
            entity.i_InsertUserOccupationalMedicalId  = dto.i_InsertUserOccupationalMedicalId;
            entity.i_UpdateUserOccupationalMedicaltId = dto.i_UpdateUserOccupationalMedicaltId;
            entity.d_InsertDateOccupationalMedical    = dto.d_InsertDateOccupationalMedical;
            entity.d_UpdateDateOccupationalMedical    = dto.d_UpdateDateOccupationalMedical;
            entity.i_HazInterconsultationId           = dto.i_HazInterconsultationId;
            entity.v_Gestapara                        = dto.v_Gestapara;
            entity.v_Menarquia                        = dto.v_Menarquia;
            entity.d_PAP                              = dto.d_PAP;
            entity.d_Mamografia                       = dto.d_Mamografia;
            entity.v_CiruGine                         = dto.v_CiruGine;
            entity.v_Findings                         = dto.v_Findings;
            entity.i_StatusLiquidation                = dto.i_StatusLiquidation;
            entity.i_ServiceTypeOfInsurance           = dto.i_ServiceTypeOfInsurance;
            entity.i_ModalityOfInsurance              = dto.i_ModalityOfInsurance;
            entity.i_IsFac                            = dto.i_IsFac;
            entity.i_InicioEnf                        = dto.i_InicioEnf;
            entity.i_CursoEnf                         = dto.i_CursoEnf;
            entity.i_Evolucion                        = dto.i_Evolucion;
            entity.v_ExaAuxResult                     = dto.v_ExaAuxResult;
            entity.v_ObsStatusService                 = dto.v_ObsStatusService;
            entity.d_FechaEntrega                     = dto.d_FechaEntrega;
            entity.v_AreaId                           = dto.v_AreaId;
            entity.v_FechaUltimoPAP                   = dto.v_FechaUltimoPAP;
            entity.v_ResultadosPAP                    = dto.v_ResultadosPAP;
            entity.v_FechaUltimaMamo                  = dto.v_FechaUltimaMamo;
            entity.v_ResultadoMamo                    = dto.v_ResultadoMamo;
            entity.r_Costo                            = dto.r_Costo;
            entity.i_EnvioCertificado                 = dto.i_EnvioCertificado;
            entity.i_EnvioHistoria                    = dto.i_EnvioHistoria;
            entity.v_IdVentaCliente                   = dto.v_IdVentaCliente;
            entity.v_IdVentaAseguradora               = dto.v_IdVentaAseguradora;
            entity.v_InicioVidaSexaul                 = dto.v_InicioVidaSexaul;
            entity.v_NroParejasActuales               = dto.v_NroParejasActuales;
            entity.v_NroAbortos                       = dto.v_NroAbortos;
            entity.v_PrecisarCausas                   = dto.v_PrecisarCausas;
            entity.i_MedicoTratanteId                 = dto.i_MedicoTratanteId;
            entity.i_IsFacMedico                      = dto.i_IsFacMedico;
            entity.v_centrocosto                      = dto.v_centrocosto;
            entity.v_NroLiquidacion                   = dto.v_NroLiquidacion;
            entity.i_MedicoPagado                     = dto.i_MedicoPagado;
            entity.i_PagoEspecialista                 = dto.i_PagoEspecialista;
            entity.i_IsControl                        = dto.i_IsControl;
            entity.i_IsRevisedHistoryId               = dto.i_IsRevisedHistoryId;
            entity.i_StatusVigilanciaId               = dto.i_StatusVigilanciaId;
            entity.v_NroCartaSolicitud                = dto.v_NroCartaSolicitud;
            entity.v_ComentaryUpdate                  = dto.v_ComentaryUpdate;
            entity.i_PlanId                           = dto.i_PlanId;
            entity.i_AptitudesStatusId_First          = dto.i_AptitudesStatusId_First;
            entity.v_CommentAptitusStatus_First       = dto.v_CommentAptitusStatus_First;
            entity.v_ComprobantePago                  = dto.v_ComprobantePago;

            dto.OnEntity(entity);

            return(entity);
        }
コード例 #17
0
ファイル: setConfig.cs プロジェクト: rlaneyjr/cheaters
        // API to run the script.
        void run_commands(string servername,string username,string password)
        {
            simpleResult result;
            service	 svc = new service();

            // Initialized the soap client
            Console.WriteLine("\nConnecting to server "+servername+" ............\n");
            client = new ClientService(servername);
            client.CookieContainer = new System.Net.CookieContainer();
            // Login request
            result = client.login(username,password) ;

            Console.WriteLine("login : "******"0")
            {
                //add service s1
                result = client.addservice("s1","10.101.0.1",null,servicetypeEnum.HTTP,80, 0xFFFFFFFF, cachtypeEnum.VALNOTSET,enabledisabledEnum.VALNOTSET);
                Console.WriteLine("add service s1 : " + result.message);

                // add service s2
                result = client.addservice("s2","10.101.0.2",null,servicetypeEnum.HTTP,80, 0xFFFFFFFF, cachtypeEnum.VALNOTSET,enabledisabledEnum.VALNOTSET);

                Console.WriteLine("add service s2 : " + result.message);

                // Modify service s1
                result = client.setservice_maxreq("s1",50);
                Console.WriteLine("set service maxReq : " + result.message);

                result = client.setservice_cip("s1",enabledisabledEnum.ENABLED,"abc");
                Console.WriteLine("set service cip : " + result.message);

                // bind monitor s1
                result = client.bindlbmonitor_service("http","s1",enabledisabledEnum.ENABLED,80);
                Console.WriteLine("bind monitor s1 : "+ result.message);

                // bind monitor s2
                result = client.bindlbmonitor_service("http","s2",enabledisabledEnum.ENABLED,80);
                Console.WriteLine("bind monitor s1 : "+ result.message);

                // add lb vserver
                result = client.addlbvserver("vip_1", vservicetypeEnum.HTTP, "10.100.0.100",80,0xFFFFFFFF,enabledisabledEnum.ENABLED,null);
                Console.WriteLine("add lb vserver newv1 : " + result.message);

                Console.WriteLine("add lb vserver vip_1 : " + result.message);

                // bind lb vserver s1

                result = client.bindlbvserver_service("vip_1","s1",10);
                Console.WriteLine("bind lb vserver s1 : "+ result.message);

                // bind lb vserver s2

                result = client.bindlbvserver_service("vip_1","s2",10);
                Console.WriteLine("bind lb vserver s2 : "+ result.message);

                // Save config

                result = client.savensconfig();
                Console.WriteLine("save config : " + result.message);

                // Logout

                result = client.logout();
                Console.WriteLine("logout : " + result.message);

            }
        }
コード例 #18
0
 public static void ExceptionToDB(this Exception ex, service service, eventID eventID)
 {
     ex.ExceptionToDB((service == service.Null ? (int?)null : (int)service), (eventID == eventID.Null ? (int?)null : (int)eventID));
 }
コード例 #19
0
 public static void EventLog(this string events, EventStatus status, service service, bool elog, bool dblog, bool flog)
 {
     events.EventLog(status, service, eventID.Null, elog, dblog, flog);
 }
コード例 #20
0
 public static void ExceptionToDB(this Exception ex, service service)
 {
     ex.ExceptionToDB((service == service.Null ? (int?)null : (int)service), null);
 }
コード例 #21
0
 public static void EventLog(this string events, EventStatus status, service service)
 {
     events.EventLog(status, service, eventID.Null, _eLogEvent, _dbLogEvent, _fLogEvent);
 }
コード例 #22
0
 public static void ExceptionToFile(this Exception ex, string log, service service, eventID eventID)
 {
     ex.ExceptionToFile(GetSource(service, eventID) + log);
 }
コード例 #23
0
 public static void InformationToEvent(this string log, service service)
 {
     log.InformationToEvent((service == service.Null ? (int?)null : (int)service), null);
 }
コード例 #24
0
 public static void ExceptionToFile(this Exception ex, service service)
 {
     ex.ExceptionToFile(GetSource(service, eventID.Null));
 }
コード例 #25
0
 public IDSThread(service servece_name)
 {
     servece_owner = servece_name;
 }
コード例 #26
0
 public static void ExceptionLog(this Exception ex, string message, service service)
 {
     ex.ExceptionLog(message, service, _eLogException, _dbLogException, _fLogException);
 }
コード例 #27
0
ファイル: AdminController.cs プロジェクト: viral7184/Theraphy
        public ActionResult service(service data)
        {
            var login = Convert.ToInt16(Session["login"]);

            if (data.ID > 0)
            {
                var conf = db.services.Where(i => i.ID == data.ID).SingleOrDefault();
                if (conf != null)
                {
                    conf.UPDATED_DATE = DateTime.Now;
                    conf.UPDATED_BY   = login;
                    if (data.SERVICE_TYPE != null)
                    {
                        conf.SERVICE_TYPE = data.SERVICE_TYPE;
                    }
                    if (data.IMAGE != null)
                    {
                        Models.carousel imgs = new carousel();
                        imgs.IMAGE = data.IMAGE;
                        HttpFileCollectionBase file = Request.Files;
                        for (int i = 0; i < file.Count; i++)
                        {
                            HttpPostedFileBase Image = file[i];
                            var filename             = "";
                            if (Image != null)
                            {
                                filename = Path.GetFileName(Image.FileName);
                                var path3 = Path.Combine(Server.MapPath("~/images"), filename);
                                Image.SaveAs(path3);
                                data.IMAGE = filename;
                                conf.IMAGE = data.IMAGE;
                            }
                        }
                    }
                    conf.SERVICE_NAME = data.SERVICE_NAME;
                    conf.DESCRIPTION  = data.DESCRIPTION;
                    if (data.IS_ACTIVE != null)
                    {
                        conf.IS_ACTIVE = data.IS_ACTIVE;
                    }
                    db.SaveChanges();
                }
            }
            else
            {
                if (data.IMAGE != null)
                {
                    Models.news imgs = new news();
                    imgs.IMAGE = data.IMAGE;
                    HttpFileCollectionBase file = Request.Files;
                    for (int i = 0; i < file.Count; i++)
                    {
                        HttpPostedFileBase Image = file[i];
                        var filename             = "";
                        if (Image != null)
                        {
                            filename = Path.GetFileName(Image.FileName);
                            var path3 = Path.Combine(Server.MapPath("~/images"), filename);
                            Image.SaveAs(path3);
                            data.IMAGE = filename;
                            db.SaveChanges();
                        }
                    }
                }
                data.CREATED_DATE = DateTime.Now;
                data.CREATED_BY   = login;

                data.IS_DELETED = false;
                var time = db.services.Add(data);
                db.SaveChanges();
            }
            return(RedirectToAction("service"));
        }
コード例 #28
0
 public static void ExceptionLog(this Exception ex, service service)
 {
     ex.ExceptionLog(service, _eLogException, _dbLogException, _fLogException);
 }
コード例 #29
0
 MoveTypeOperationKind.MoveTypeNamespaceScope => new MoveTypeNamespaceScopeEditor(service, state, fileName, cancellationToken),
コード例 #30
0
 public static void ExceptionMethodLog(this Exception ex, string method, service service, bool elog, bool dblog, bool flog)
 {
     ex.ExceptionLog(GetMessageMethod(method), service, elog, dblog, flog);
 }
コード例 #31
0
 /// <summary>
 /// Invoked when <see cref="ToEntity"/> operation is about to return.
 /// </summary>
 /// <param name="entity"><see cref="service"/> converted from <see cref="serviceDto"/>.</param>
 static partial void OnEntity(this serviceDto dto, service entity);
コード例 #32
0
 public static void ExceptionMethodLog(this Exception ex, string method, service service)
 {
     ex.ExceptionMethodLog(method, service, _eLogException, _dbLogException, _fLogException);
 }
コード例 #33
0
 public IDS_SAP(service servece_owner)
     : base(servece_owner)
 {
 }
コード例 #34
0
 //public static void LogError(Exception e, string message)
 //{
 //    Console.WriteLine(e.ToString());
 //    FileLogs.SaveError(message, e);
 //}
 #region Вспомогательные функции
 public static string GetSource(service service, eventID eventID)
 {
     return(String.Format("[service.{0}, eventID.{1}] ", service, eventID));
 }
コード例 #35
0
 public hubmanager(service.connectnetworkservice _conn)
 {
     _hub_connect = _conn;
     ch_hubs = new Dictionary<juggle.Ichannel, hubproxy>();
     uuid_hubs = new Dictionary<string, hubproxy>();
 }
コード例 #36
0
 public static void EventToDB(this string events, EventStatus status, service service, eventID eventID)
 {
     events.EventToDB(status, (service == service.Null ? (int?)null : (int)service), (eventID == eventID.Null ? (int?)null : (int)eventID));
 }