12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- using Microsoft.VisualBasic.ApplicationServices;
- using NPOI.XSSF.UserModel;
- using OpenQA.Selenium;
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
- using System.Net.Http;
- using System.Text;
- using System.Threading.Tasks;
- namespace wispro.sp.winClient
- {
- public class IPEasyDownloader
- {
- private HttpClient _httpClient;
- public void login(string accountName,string password)
- {
- var handler = new HttpClientHandler() { UseCookies = true ,CookieContainer= new System.Net.CookieContainer()};
- _httpClient = new HttpClient(handler);
- Dictionary<string, string> values = new Dictionary<string, string>();
- values.Add("txtUser", accountName);
- values.Add("txtPwd", password);
- values.Add("validate_txt","");
- values.Add("txtMsgCode", "");
- values.Add("txtCAPwd", "");
- values.Add("btnLogin", "登录");
- values.Add("loginflag", "login");
- values.Add("chk_password", "on");
- values.Add("hidLoginType", "user");
- values.Add("hid_hasbox", "false");
- //FormUrlEncodeContent
- HttpContent content = new FormUrlEncodedContent(values);
- var respose = _httpClient.PostAsync("http://47.106.221.167/Login.aspx", content);
- respose.Wait();
-
- //var cookies =handler.CookieContainer.GetCookies(new Uri("http://47.106.221.167")).Cast<Cookie>().ToList();
- }
- public void Search(string caseNo)
- {
- Dictionary<string, string> values = new Dictionary<string, string>();
- values.Add("pageIndex", "1");
- values.Add("pageSize", "10");
- values.Add("Call", "IPCaseSearch");
- values.Add("Element", $"<case_volume>{caseNo}</case_volume><case_volume_customer></case_volume_customer><app_no></app_no><case_name></case_name><customer></customer><customer_code></customer_code><sales></sales><sales_text></sales_text><saletxtSearch></saletxtSearch><applicant></applicant><app_volume></app_volume><case_type>31D1A147-2931-43B5-94AE-B72B1525BA8A</case_type><apply_type></apply_type><app_date_start></app_date_start><app_date_end></app_date_end><pct_app_date_start></pct_app_date_start><pct_app_date_end></pct_app_date_end><sale_dept_id></sale_dept_id><sale_dept_id_text></sale_dept_id_text><sale_depttxtSearch></sale_depttxtSearch><applicant_adds></applicant_adds><customer_from></customer_from><contact></contact><agency></agency><agency_text></agency_text><TreetxtSearch></TreetxtSearch><charge_dept_id></charge_dept_id><charge_dept_id_text></charge_dept_id_text><charge_dept_treetxtSearch></charge_dept_treetxtSearch><country></country><country_text></country_text><country_treetxtSearch></country_treetxtSearch><apply_no></apply_no><pub_no></pub_no><pub_date_start></pub_date_start><pub_date_end></pub_date_end><issue_no></issue_no><issue_date_start></issue_date_start><issue_date_end></issue_date_end><certificate_no></certificate_no><expire_date_start></expire_date_start><expire_date_end></expire_date_end><business_type></business_type><examime_date_start></examime_date_start><examime_date_end></examime_date_end><case_status></case_status><case_status_text></case_status_text><ctrl_case_statustxtSearch></ctrl_case_statustxtSearch><create_time_start></create_time_start><create_time_end></create_time_end><flow_direction></flow_direction><flow_direction_text></flow_direction_text><one_with_second></one_with_second><authorize_date_start></authorize_date_start><authorize_date_end></authorize_date_end><inventor></inventor><filing_type></filing_type><priority_no></priority_no><priority_date_start></priority_date_start><priority_date_end></priority_date_end><pct_pub_no></pct_pub_no><pct_pub_date_start></pct_pub_date_start><pct_pub_date_end></pct_pub_date_end><register_type_code></register_type_code><register_type_code_text></register_type_code_text><case_pic_user></case_pic_user><case_pic_user_text></case_pic_user_text><casepicusertxtSearch></casepicusertxtSearch><case_agent_user></case_agent_user><case_agent_user_text></case_agent_user_text><caseagentusertxtSearch></caseagentusertxtSearch><case_volume_agency></case_volume_agency><sales_help></sales_help><sales_help_text></sales_help_text><tree_sales_helptxtSearch></tree_sales_helptxtSearch><charge_date_start></charge_date_start><charge_date_end></charge_date_end><p_case_info__from_stage></p_case_info__from_stage><apply_name></apply_name><p_case_info_flow_user_id></p_case_info_flow_user_id><p_case_info_flow_user_id_text></p_case_info_flow_user_id_text><tree_p_case_info_flow_user_idtxtSearch></tree_p_case_info_flow_user_idtxtSearch><apply_create_user_id></apply_create_user_id><apply_create_user_id_text></apply_create_user_id_text><tree_apply_create_user_idtxtSearch></tree_apply_create_user_idtxtSearch><contract_date_from></contract_date_from><contract_date_to></contract_date_to><business_coop></business_coop><apply_tags_id></apply_tags_id><apply_tags_id_text></apply_tags_id_text><das_code></das_code><customer_no></customer_no><column_1></column_1><column_2></column_2><column_3></column_3><column_4></column_4><column_5></column_5><divisional_date_start></divisional_date_start><divisional_date_end></divisional_date_end><case_remark></case_remark><pct_app_no></pct_app_no><i_ctrl_proc></i_ctrl_proc><i_ctrl_proc_text></i_ctrl_proc_text><ctrl_proc_idtxtSearch></ctrl_proc_idtxtSearch><allocate_date_start></allocate_date_start><allocate_date_end></allocate_date_end><int_due_date_start></int_due_date_start><int_due_date_end></int_due_date_end><cus_due_date_start></cus_due_date_start><cus_due_date_end></cus_due_date_end><legal_due_date_start></legal_due_date_start><legal_due_date_end></legal_due_date_end><first_doc_date_start></first_doc_date_start><first_doc_date_end></first_doc_date_end><finish_doc_date_start></finish_doc_date_start><finish_doc_date_end></finish_doc_date_end><back_date_start></back_date_start><back_date_end></back_date_end><case_mail_date_start></case_mail_date_start><case_mail_date_end></case_mail_date_end><finish_date_start></finish_date_start><finish_date_end></finish_date_end><doc_date_start></doc_date_start><doc_date_end></doc_date_end><second_proc_finish_date_start></second_proc_finish_date_start><second_proc_finish_date_end></second_proc_finish_date_end><doc_no></doc_no><doc_name></doc_name><doc_office></doc_office><doc_examiner></doc_examiner><proc_status></proc_status><pic_no_user></pic_no_user><proc_finish></proc_finish><review_stage></review_stage><review_stage_text></review_stage_text><reviewstagetxtSearch></reviewstagetxtSearch><pic_user></pic_user><pic_user_text></pic_user_text><picusertxtSearch></picusertxtSearch><pic_user_dept></pic_user_dept><pic_user_dept_text></pic_user_dept_text><picuserdepttxtSearch></picuserdepttxtSearch><proc_creater></proc_creater><proc_creater_text></proc_creater_text><proccreatertxtSearch></proccreatertxtSearch><proc_create_time_start></proc_create_time_start><proc_create_time_end></proc_create_time_end><proc_updater></proc_updater><proc_updater_text></proc_updater_text><procupdatertxtSearch></procupdatertxtSearch><proc_update_time_start></proc_update_time_start><proc_update_time_end></proc_update_time_end><revise_user_id></revise_user_id><revise_user_id_text></revise_user_id_text><reviseuseridtxtSearch></reviseuseridtxtSearch><contract_code></contract_code><proc_note></proc_note>");
- values.Add("is_proc", "false");
- values.Add("is_fuzzy_query_app_no", "false");
- values.Add("is_fuzzy_query_case_volume", "false");
- values.Add("is_point_app_no", "false");
- values.Add("colsel", ";undefined;case_volume;case_name;applicants;pic_case;app_no;app_date;apply_type;country_name;business_type;case_status;sales;sales_help;customer_code;issue_date;");
- values.Add("log_pagename", "IPSearch.aspx");
- //FormUrlEncodeContent
- HttpContent content = new FormUrlEncodedContent(values);
- var respose = _httpClient.PostAsync("http://47.106.221.167/AjaxServers/CaseInfo.ashx", content);
- respose.Wait();
- var respMsg= respose.Result;
- }
- }
- }
|