Exemplo n.º 1
0
        /// <summary>
        /// 获取值班员列表
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        public InterfaceOutPut GetDytyUserList(string data)
        {
            InterfaceOutPut output = new InterfaceOutPut();

            output.result = 1;
            try
            {
                DBDutyUser db = new DBDutyUser();
                DataTable  dt = db.GetDutyUserList();
                output.data   = dt;
                output.result = 0;
            }
            catch (Exception ex)
            {
                output.resultStr = ex.Message;
                throw ex;
            }
            return(output);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 1.15.2    修改密码
        /// </summary>
        public InterfaceOutPut ResetPassword(String Data)
        {
            InterfaceOutPut output = new InterfaceOutPut();

            output.result = 1;
            try
            {
                InResetPassword InParams = JsonConvert.DeserializeObject <InResetPassword>(Data);
                DBDutyUser      db       = new DBDutyUser();
                db.ResetPassword(InParams.UserNumber, InParams.NewPassword);
                output.result = 0;
            }
            catch (Exception ex)
            {
                output.resultStr = ex.Message;
                throw ex;
            }
            return(output);
        }
Exemplo n.º 3
0
        /// <summary>
        /// 1.15.1    根据用户名获取登录人员信息
        /// </summary>
        public InterfaceOutPut GetDutyUserByNumber(String Data)
        {
            InterfaceOutPut output = new InterfaceOutPut();

            output.result = 1;
            Boolean bExist;

            try
            {
                InGetDutyUserByNumber  InParams  = JsonConvert.DeserializeObject <InGetDutyUserByNumber>(Data);
                OutGetDutyUserByNumber OutParams = new OutGetDutyUserByNumber();
                DBDutyUser             db        = new DBDutyUser();
                OutParams.dutyUser = db.GetDutyUserByNumber(InParams.DutyNumber, out bExist);
                OutParams.bExist   = bExist;
                output.data        = OutParams;
                output.result      = 0;
            }
            catch (Exception ex)
            {
                output.resultStr = ex.Message;
                throw ex;
            }
            return(output);
        }