public byte[] PO_Update(byte[] loginTicket, byte[] data)
    {
        try
        {
            Loginer loginer = WebServiceSecurity.ValidateLoginer(loginTicket);

            DataSet    ds     = ZipTools.DecompressionDataSet(data);
            SaveResult result = new dalPO(loginer).Update(ds);
            return(ZipTools.CompressionObject(result));
        }
        catch (Exception ex)
        {
            throw new FaultException(ex.Message);
        }
    }
Exemple #2
0
        public byte[] DownloadDicts(byte[] loginTicket)
        {
            try
            {
                Loginer loginer = WebServiceSecurity.ValidateLoginer(loginTicket);

                DataSet data = new dalBaseDataDict(loginer).DownloadDicts();

                return(ZipTools.CompressionObject(data));//序列化返回对象
            }
            catch (Exception ex)
            {
                throw new FaultException(ex.Message);
            }
        }
Exemple #3
0
    public byte[] GetDataDictByTableName(byte[] loginTicket, string tableName)
    {
        try
        {
            Loginer loginer = WebServiceSecurity.ValidateLoginer(loginTicket);

            dalBaseDataDict dict = new dalBaseDataDict(loginer, tableName);
            DataTable       data = dict.GetSummaryData();
            return(ZipTools.CompressionObject(ServerLibrary.TableToDataSet(data)));
        }
        catch (Exception ex)
        {
            throw new FaultException(ex.Message);;
        }
    }
Exemple #4
0
        public byte[] UpdateEx(byte[] loginTicket, byte[] bs, string ORM_TypeName)
        {
            try
            {
                Loginer loginer = WebServiceSecurity.ValidateLoginer(loginTicket);

                DataSet         data   = ZipTools.DecompressionDataSet(bs);
                dalBaseDataDict dict   = dalBaseDataDict.CreateDalByORM(loginer, ORM_TypeName);
                SaveResultEx    result = dict.UpdateEx(data); //保存数据
                return(ZipTools.CompressionObject(result));   //序列化返回对象
            }
            catch (Exception ex)
            {
                throw new FaultException(ex.Message);
            }
        }
Exemple #5
0
 /// <summary>
 /// Image to byte[]
 /// </summary>
 public static void ParseImageToByteArray(object sender, ConvertEventArgs e)
 {
     try
     {
         if (e.Value != null)
         {
             e.Value = ZipTools.CompressionObject(e.Value as Image);
         }
         else
         {
             e.Value = DBNull.Value;
         }
     }
     catch
     {
         e.Value = DBNull.Value;
     }
 }
Exemple #6
0
        /// <summary>
        /// 登出
        /// </summary>
        /// <param name="account"></param>
        public async Task <byte[]> Logout(string account)
        {
            var log = await new UserManager().Logout(account);

            return(ZipTools.CompressionObject(log));
        }
Exemple #7
0
        /// <summary>
        /// 根据账户获取账户信息
        /// </summary>
        /// <param name="account"></param>
        /// <returns></returns>
        public async Task <byte[]> GetModelByAccount(string account)
        {
            var User = await new UserManager().GetModelByAccount(account);

            return(ZipTools.CompressionObject(User));
        }
Exemple #8
0
        /// <summary>
        /// 获取用户权限
        /// </summary>
        /// <param name="account"></param>
        /// <returns></returns>
        public async Task <byte[]> GetAuthority(string account)
        {
            var UserAuth = await new UserManager().GetAuthority(account);

            return(ZipTools.CompressionObject(UserAuth));
        }
Exemple #9
0
        /// <summary>
        ///  登录系统
        /// </summary>
        /// <param name="account">账户</param>
        /// <param name="password">密码</param>
        /// <returns></returns>
        public async Task <byte[]> Login(string account, string password)
        {
            var User = await new UserManager().Login(account, password);

            return(ZipTools.CompressionObject(User));
        }
Exemple #10
0
        /// <summary>
        /// 删除组
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public async Task <byte[]> RemovebyGroup(int id)
        {
            var result = await new GroupManager().Remove(id);

            return(ZipTools.CompressionObject(result));
        }
Exemple #11
0
        /// <summary>
        /// 获取菜单树
        /// </summary>
        /// <returns></returns>
        public async Task <byte[]> GetMenuTrees()
        {
            var MenuList = await new MenuManager().GetMenuTrees();

            return(ZipTools.CompressionObject(MenuList));
        }