/// <summary> 获取企业信息并转换成json返回 /// </summary> /// <returns>返回json</returns> private string GetModelFromFrm() { tb_signing_info model = new tb_signing_info(); model.comName = txtcom_name.Caption.Trim(); model.province = ddlprovince.SelectedValue.ToString(); model.city = ddlcounty.SelectedValue.ToString(); model.county = ddlcounty.SelectedValue.ToString(); model.comAddress = txtcom_address.Caption.Trim(); model.zipCode = txtzip_code.Caption.Trim(); model.comContact = txtcom_contact.Caption.Trim(); model.comTel = txtcom_tel.Caption.Trim(); model.legalPerson = txtlegal_person.Caption.Trim(); model.repairQualification = cmbrepair_qualification.SelectedValue.ToString(); model.unitProperties = cmbunit_properties.SelectedValue.ToString(); model.comEmail = txtcom_email.Caption.Trim(); model.hotLtel = txthotline.Caption.Trim(); model.comFax = txtcom_fax.Caption.Trim(); model.serviceStationSap = txtservice_station_sap.Caption.Trim(); model.accessCode = txtaccess_code.Caption.Trim(); model.machineSerial = txtmachine_code_sequence.Caption.Trim(); string version = "V" + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(); model.serviceVersion = version.Substring(0, version.Length - 2); model.macAddress = GetIP.GetMacAddress(); string jsonStr = Newtonsoft.Json.JsonConvert.SerializeObject(model); return(jsonStr); }
private void _Login(object state) { LoginInput loginO = new LoginInput(); loginO.username = this.userName; loginO.pwd = this.pwd; loginO.MAC = GetIP.GetMacAddress(); loginO.ComputerName = GetIP.GetComputerName(); GlobalStaticObj_Server.Instance.LoginIP = Utility.Tools.HardwareSerialNumber.Get_UserIP(); string errMsg = string.Empty; try { DataSet ds = new DataSet(); errMsg = BLL.ServerUser.UserLogin(loginO, GlobalStaticObj_Server.DbPrefix + GlobalStaticObj_Server.CommAccCode, GlobalStaticObj_Server.Instance.LoginIP, out ds); if (string.IsNullOrEmpty(errMsg)) { GlobalStaticObj.gLoginDataSet = ds; } } catch { errMsg = "数据库连接异常!"; } if (this.uiHandler != null) { this.Invoke(this.uiHandler, errMsg); } }
private void bindData() { B_InforData bf=new B_InforData(); thisCP.NavigateUrl = bf.getCpByID(id)["Sort_Value"].ToString() + ".aspx"; thisCP.Text = bf.getCpByID(id)["Sort_Name"].ToString(); dataTableByID.InnerHtml = bf.getInforByID(id); GetIP g = new GetIP(); R_Read r = new R_Read(); r.News_ID = id; r.Read_IP = g.GetRealIP(); r.Read_Time = DateTime.Now.Date; B_News bn = new B_News(); webInfor.InnerHtml = bn.getWebInfor().Tables[0].Rows[0]["News_Content"].ToString(); B_Index bi=new B_Index(); try { bi.searchRead(r); } catch (Exception ex) { Response.Write(ex.Message); } }