Exemplo n.º 1
0
        private bool CheckPassWord()
        {
            try
            {
                OperatorFacade operatorFacade = new OperatorFacade();
                DataSet        opds           = operatorFacade.GetLoginOperatorInfo(SysOperatorInfo.OperatorCode);
                if (opds.Tables[0].Rows.Count == 0)
                {
                    SkyComm.ShowMessageInfo("找不到该用户!");
                    return(false);
                }
                DataRow dr = opds.Tables[0].Rows[0];
                if (dr == null)
                {
                    SkyComm.ShowMessageInfo("错误的用户名!");
                    return(false);
                }
                else if (EncryptDecrypt.Decrypt(dr["PASSWORD"].ToString()) != this.txtPassword.Text)
                {
                    SkyComm.ShowMessageInfo("密码输入不正确!");
                    return(false);
                }

                return(true);
            }
            catch
            {
                return(false);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// 构造大通合理用药入参
        /// </summary>
        /// <returns></returns>
        private string PassXmlCreate(string doctorID, string OfficeID)
        {
            ETechnicalpostFacade eTechnicalpostFacade = new ETechnicalpostFacade();
            DataSet dsRole   = eTechnicalpostFacade.GetTeachInfo(doctorID);
            DataSet dsDoctor = new OperatorFacade().FindOperatorInfobyUserID(doctorID);
            string  office   = new OfficeFacade().FindAllNameByOfficeID(OfficeID).Tables[0].Rows[0]["office"].ToString();
            string  strbase  = "<base_xml>" +
                               "<source>HIS</source> " +
                               "<hosp_code>1790</hosp_code> " +
                               "<dept_code>" + OfficeID + "</dept_code> " +
                               "<dept_name>" + office + "</dept_name> " +
                               "<doct>" +
                               "<code>" + dsDoctor.Tables[0].Rows[0]["OPERATORID"].ToString() + "</code>  " +
                               "<name>" + dsDoctor.Tables[0].Rows[0]["OPERATORNAME"].ToString() + "</name>  " +
                               "<type>" + dsRole.Tables[0].Rows[0]["TECHNICALPOSTID"].ToString() + "</type>  " +
                               "<type_name>" + dsRole.Tables[0].Rows[0]["TECHNICALPOST"].ToString() + "</type_name> " +
                               "</doct>" +
                               "</base_xml>";

            return(strbase);
        }
Exemplo n.º 3
0
        private static bool login()
        {
            string      HostName  = Dns.GetHostName();
            IPHostEntry hostEntry = Dns.GetHostByName(HostName);
            string      IpAddress = hostEntry.AddressList[0].ToString();

            //通过计算机名和IP地址查询自助机信息表的相关配置
            AutoServiceMachineInfoFacade AutoServiceFac  = new AutoServiceMachineInfoFacade();
            AutoServiceMachineInfoData   AutoServiceData = AutoServiceFac.GetByIPAddressHostName(IpAddress, HostName);

            if (AutoServiceData == null)
            {
                SkynetMessage.MsgInfo("该自助机IP地址和计算名没有登记,请与管理员联系!");
                return(false);
            }
            if (AutoServiceData.Stopflag == 1)
            {
                SkynetMessage.MsgInfo("该自助机已被停用,不能正常使用");
                return(false);
            }
            AutoHostConfig.SendCardType = AutoServiceData.Sendcardtype;
            AutoHostConfig.SendCardPort = AutoServiceData.Sendcardport;
            AutoHostConfig.ReadCardType = AutoServiceData.Readcardtype;

            LogService.GlobalInfoMessage("读卡机类型:" + AutoServiceData.Readcardtype);

            AutoHostConfig.ReadCardPort = AutoServiceData.Readcardport;

            AutoHostConfig.CashBoxType      = AutoServiceData.Cashboxtype;
            AutoHostConfig.CashBoxPort      = AutoServiceData.Cashboxport;
            AutoHostConfig.IDCardType       = AutoServiceData.Idcardtype;
            AutoHostConfig.IDCardPort       = AutoServiceData.Idcardport;
            AutoHostConfig.MachineType      = AutoServiceData.Machinetype;
            AutoHostConfig.Machineno        = AutoServiceData.Machineno;
            AutoHostConfig.PosInterfaceType = AutoServiceData.PosInterfaceType;
            AutoHostConfig.PosNo            = AutoServiceData.PosNo;
            AutoHostConfig.BankName         = AutoServiceData.BankName;
            AutoHostConfig.ClosePassword    = AutoServiceData.Closepassword;
            AutoHostConfig.OpenDoorPassword = AutoServiceData.Opendoorpassword;


            //登陆HIS操作系统
            OperatorFacade operatorFacade = new OperatorFacade();
            DataSet        opds           = operatorFacade.GetLoginOperatorInfo(AutoServiceData.Operatorcodeno);

            if (opds.Tables[0].Rows.Count == 0)
            {
                SkynetMessage.MsgInfo("自助机对应的用户在系统中找不到!");
                return(false);
            }

            //根据查询的结果给AutoHostConfig中变量赋值,保存操作员的相关信息,以及设备的相关信息
            DataRow OperatorRow = opds.Tables[0].Rows[0];

            SysOperatorInfo.OperatorID       = OperatorRow["OPERATORID"].ToString();
            SysOperatorInfo.OperatorCode     = AutoServiceData.Operatorcodeno;
            SysOperatorInfo.OperatorName     = OperatorRow["OPERATORNAME"].ToString();
            SysOperatorInfo.OperatorWorkkind = OperatorRow["WORKKIND"].ToString();
            SysOperatorInfo.UserID           = OperatorRow["USERID"].ToString();

            SysOperatorInfo.OperatorOfficeID = OperatorRow["OFFICEID"].ToString();
            DataSet dsofficeArea = new OfficeFacade().FindHospitalAreaInfoByOfficeID(SysOperatorInfo.OperatorOfficeID);

            if (dsofficeArea.Tables.Count > 0 && dsofficeArea.Tables[0].Rows.Count > 0)
            {
                SysOperatorInfo.OperatorAreaid   = dsofficeArea.Tables[0].Rows[0]["AREAID"].ToString();
                SysOperatorInfo.OperatorAreaname = dsofficeArea.Tables[0].Rows[0]["AREANAME"].ToString();
            }
            else
            {
                SysOperatorInfo.OperatorAreaid   = string.Empty;
                SysOperatorInfo.OperatorAreaname = string.Empty;
            }

            OfficeAttachFacade officeAttachFacade = new OfficeAttachFacade();

            SysOperatorInfo.CustomerName = officeAttachFacade.GetCustomName();

            return(true);
        }