Beispiel #1
0
        /// <summary>
        /// User Inforamation set  To class object.
        /// </summary>
        private void _setUserInfo()
        {
            cmdUser     _user   = new cmdUser();
            cmbAuditLog command = new cmbAuditLog();

            UserInfo = _user.GetUserMaster(UserID)[0];
            if (UserInfo != null)
            {
                //Set User last login;
                LastLoginTime = command.UserLastLogin(UserID);
                //Set User Permissions
                Permissions = _user.GetUserMaster(UserID)[0].Permission;
                //Set Role of user
                _setRole();
            }
        }
Beispiel #2
0
        /// <summary>
        /// User Information and CanOverride set;
        /// </summary>
        private void SetCanOverrides()
        {
            cmdUser _UserCall = new cmdUser();

            CanOverride = true;
            List <cstUserMasterTbl> userInfo = new List <cstUserMasterTbl>();

            foreach (cstPackageTbl _packItem in PackingInfo)
            {
                userInfo.Add(_UserCall.GetUserMaster(_packItem.UserID)[0]);

                if (_packItem.MangerOverride == 1 || _packItem.MangerOverride == 2)
                {
                    CanOverride = false;
                    //UserInfo_ShipmentPackedBy = _UserCall.GetUserMaster().SingleOrDefault(i => i.UserID == _packItem.UserID);
                }
            }
            UserInfo_ShipmentPackedBy = userInfo;
        }
Beispiel #3
0
        public List <cstDashBoardStion> GetStationByReport(DateTime DateReport)
        {
            List <cstDashBoardStion> _lsStationPacked = new List <cstDashBoardStion>();

            try
            {
                cmdUser user           = new cmdUser();
                var     vStationPacked = from station in lent.Stations
                                         join pack in lent.Packages
                                         on station.StationID equals pack.StationID
                                         where EntityFunctions.TruncateTime(pack.StartTime) == EntityFunctions.TruncateTime(DateReport)
                                         group pack by station.StationID into GStationPack
                                         select new
                {
                    StationID   = GStationPack.Key,
                    StaionName  = GStationPack.FirstOrDefault(i => i.Station.StationName != null).Station.StationName,
                    PackedCount = GStationPack.Count(i => i.PackingStatus == 0),
                };
                cstDashBoardStion dash = new cstDashBoardStion();
            }
            catch (Exception)
            { }
            return(_lsStationPacked);
        }
Beispiel #4
0
        /// <summary>
        /// Total packed shipment count
        /// </summary>
        /// <param name="userId">long User ID </param>
        /// <returns>list of valur pair veriable</returns>
        public List <KeyValuePair <string, long> > GetTotalToday(Guid userId)
        {
            cmdUser command = new cmdUser();

            return(command.GetTotalShipmentsPackedToday(userId));
        }
Beispiel #5
0
        /// <summary>
        /// Search the user information in UserMaster Table
        /// </summary>
        /// <param name="UserID">long</param>
        /// <returns>list of cstUserMaster</returns>
        public List <cstUserMasterTbl> GetSelcetedUserMaster(Guid UserID)
        {
            cmdUser command = new cmdUser();

            return(command.GetUserMaster(UserID));
        }
Beispiel #6
0
        /// <summary>
        /// Selected User Information from user Master Table.
        /// (Login Screen)
        /// </summary>
        /// <param name="UserName">Which User Information Requested</param>
        /// <returns>List OF User Information Values.</returns>
        public List <cstUserMasterTbl> GetSelcetedUserMaster(String UserName)
        {
            cmdUser command = new cmdUser();

            return(command.GetUserMaster(UserName));
        }
Beispiel #7
0
        /// <summary>
        /// User Master Update command
        /// Override method to Execute
        /// </summary>
        /// <param name="lsUserInformation">list of user information to be updated.</param>
        /// <param name="UserID">User ID whose Information been updated.</param>
        /// <returns>Boolen Value True if updation successful else fail</returns>
        public Boolean SetUserMaster(List <cstUserMasterTbl> lsUserInformation, Guid UserID)
        {
            cmdUser command = new cmdUser();

            return(command.SetUserMaster(lsUserInformation, UserID));
        }
Beispiel #8
0
        /// <summary>
        /// get all information from the UserMaster table and return it as a list of userInformation_CustomEntity
        /// </summary>
        /// <returns>list of user Information Table rows</returns>
        public List <cstUserMasterTbl> GetUserInfoList()
        {
            cmdUser command = new cmdUser();

            return(command.GetUserMaster());
        }