public static int GetIdByGroupId(string groupId) { LineGroupRepository lineGroup_repo = new LineGroupRepository(); int id = lineGroup_repo.GetIdByGroupId(groupId); return(id); }
public static List <CompareStoreManager> GroupNullCompare() { LineGroupRepository lineGroup_repo = new LineGroupRepository(); List <CompareStoreManager> userId = lineGroup_repo.GroupNullCompare(); return(userId); }
public static List <LineGroup> GetGroupList(int managerId) { LineGroupRepository lineGroup_repo = new LineGroupRepository(); List <LineGroup> groupName = lineGroup_repo.GetGroupList(managerId).ToList(); return(groupName); }
public static int GetManagerId(string aspNetUserId) { LineGroupRepository lineGroup_repo = new LineGroupRepository(); int managerId = lineGroup_repo.GetMangerIdByAspNetId(aspNetUserId); return(managerId); }
public static int SearchLineID(string lineID) { LineGroupRepository lineGroup_repo = new LineGroupRepository(); int storeManagerId = lineGroup_repo.SearchLineID(lineID); return(storeManagerId); }
public static string GetLineGroupIDByID(int groupId) { LineGroupRepository lineGroup_repo = new LineGroupRepository(); string LineGroupID = lineGroup_repo.GetLineGroupIDByID(groupId); return(LineGroupID); }
public LineGroup GetGroupByID() { LineGroupRepository lineGroup_repo = new LineGroupRepository(); LineGroup lineGroup = lineGroup_repo.SearchLineGroup(GroupId); return(lineGroup); }
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); }
public bool SearchLineGroup() { LineGroupRepository lineGroup_repo = new LineGroupRepository(); LineGroup lineGroup = lineGroup_repo.SearchLineGroup(GroupId); if (lineGroup != null) { return(true); } else { return(false); } }
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); }
public static void CompareUpdateGroupid(string groupId, int storeManagerId, DateTime?timestampTotime) { LineGroupRepository lineGroup_repo = new LineGroupRepository(); lineGroup_repo.CompareUpdateGroupid(groupId, storeManagerId, timestampTotime); }
public static void InsertGroupName(int managerId, string groupName) { LineGroupRepository lineGroup_repo = new LineGroupRepository(); lineGroup_repo.InsertGroupName(managerId, groupName); }
public static void UpdateBotGroup(int groupId, string LineGroupID, string status, DateTime time) { LineGroupRepository lineGroup_repo = new LineGroupRepository(); lineGroup_repo.UpdateBotGroup(groupId, LineGroupID, status, time); }
public static void UpdateManagerAllGroupStatus(int StoreManagerID, string status) { LineGroupRepository lineGroup_repo = new LineGroupRepository(); lineGroup_repo.UpdateManagerAllGroupStatus(StoreManagerID, status); }
public static void UpdateGroupStatus(int groupId, string status) { LineGroupRepository lineGroup_repo = new LineGroupRepository(); lineGroup_repo.UpdateGroupStatus(groupId, status); }
public static void DelNullGroup(int groupId) { LineGroupRepository lineGroup_repo = new LineGroupRepository(); lineGroup_repo.DelNullGroup(groupId); }