Example #1
0
        public static int GetIdByGroupId(string groupId)
        {
            LineGroupRepository lineGroup_repo = new LineGroupRepository();
            int id = lineGroup_repo.GetIdByGroupId(groupId);

            return(id);
        }
Example #2
0
        public static List <CompareStoreManager> GroupNullCompare()
        {
            LineGroupRepository        lineGroup_repo = new LineGroupRepository();
            List <CompareStoreManager> userId         = lineGroup_repo.GroupNullCompare();

            return(userId);
        }
Example #3
0
        public static List <LineGroup> GetGroupList(int managerId)
        {
            LineGroupRepository lineGroup_repo = new LineGroupRepository();
            List <LineGroup>    groupName      = lineGroup_repo.GetGroupList(managerId).ToList();

            return(groupName);
        }
Example #4
0
        public static int GetManagerId(string aspNetUserId)
        {
            LineGroupRepository lineGroup_repo = new LineGroupRepository();
            int managerId = lineGroup_repo.GetMangerIdByAspNetId(aspNetUserId);

            return(managerId);
        }
Example #5
0
        public static int SearchLineID(string lineID)
        {
            LineGroupRepository lineGroup_repo = new LineGroupRepository();
            int storeManagerId = lineGroup_repo.SearchLineID(lineID);

            return(storeManagerId);
        }
Example #6
0
        public static string GetLineGroupIDByID(int groupId)
        {
            LineGroupRepository lineGroup_repo = new LineGroupRepository();
            string LineGroupID = lineGroup_repo.GetLineGroupIDByID(groupId);

            return(LineGroupID);
        }
Example #7
0
        public LineGroup GetGroupByID()
        {
            LineGroupRepository lineGroup_repo = new LineGroupRepository();
            LineGroup           lineGroup      = lineGroup_repo.SearchLineGroup(GroupId);

            return(lineGroup);
        }
Example #8
0
        public static List <LineGroup> GetNullGroup(int managerId)
        {
            List <LineGroup>    result         = new List <LineGroup>();
            LineGroupRepository lineGroup_repo = new LineGroupRepository();
            var nullGroupName = lineGroup_repo.GetNullGroup(managerId);

            if (nullGroupName != null)
            {
                result = nullGroupName.ToList();
            }
            return(result);
        }
Example #9
0
        public bool SearchLineGroup()
        {
            LineGroupRepository lineGroup_repo = new LineGroupRepository();
            LineGroup           lineGroup      = lineGroup_repo.SearchLineGroup(GroupId);

            if (lineGroup != null)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Example #10
0
        public static string SetMsgFormat(int groupOrderId, ref string groupId)
        {
            LineGroupRepository        lineGroup_repo    = new LineGroupRepository();
            LineCustomerRepository     lineCustomer_repo = new LineCustomerRepository();
            SendMessageViewModel       messageInfo       = lineGroup_repo.GetMessageInfoByGroupOrderId(groupOrderId);
            List <NameAndQtyViewModel> customers         = lineCustomer_repo.GetCustomersByGroupOrderId(groupOrderId);
            string message = $"!!!成團成功!!!\n活動:{messageInfo.Title}\n商品名稱:{messageInfo.ProductName}\n";

            groupId = messageInfo.LineGroupId;
            foreach (var customer in customers.GroupBy(info => info.Name)
                     .Select(group => new
            {
                Name = group.Key,
                Count = customers.Where(x => x.Name == group.Key).Sum(x => x.Quantity)
            }))
            {
                message += $"@{customer.Name} : {customer.Count} 組\n";
            }

            return(message);
        }
Example #11
0
        public static void CompareUpdateGroupid(string groupId, int storeManagerId, DateTime?timestampTotime)
        {
            LineGroupRepository lineGroup_repo = new LineGroupRepository();

            lineGroup_repo.CompareUpdateGroupid(groupId, storeManagerId, timestampTotime);
        }
Example #12
0
        public static void InsertGroupName(int managerId, string groupName)
        {
            LineGroupRepository lineGroup_repo = new LineGroupRepository();

            lineGroup_repo.InsertGroupName(managerId, groupName);
        }
Example #13
0
        public static void UpdateBotGroup(int groupId, string LineGroupID, string status, DateTime time)
        {
            LineGroupRepository lineGroup_repo = new LineGroupRepository();

            lineGroup_repo.UpdateBotGroup(groupId, LineGroupID, status, time);
        }
Example #14
0
        public static void UpdateManagerAllGroupStatus(int StoreManagerID, string status)
        {
            LineGroupRepository lineGroup_repo = new LineGroupRepository();

            lineGroup_repo.UpdateManagerAllGroupStatus(StoreManagerID, status);
        }
Example #15
0
        public static void UpdateGroupStatus(int groupId, string status)
        {
            LineGroupRepository lineGroup_repo = new LineGroupRepository();

            lineGroup_repo.UpdateGroupStatus(groupId, status);
        }
Example #16
0
        public static void DelNullGroup(int groupId)
        {
            LineGroupRepository lineGroup_repo = new LineGroupRepository();

            lineGroup_repo.DelNullGroup(groupId);
        }