Пример #1
0
 public void StartMe()
 {
     if (!IsRunning)
     {
         Gini.Start();
         IsRunning = true;
     }
 }
Пример #2
0
 public GiniService()
 {
     if (!IsRunning)
     {
         Gini.Start();
         IsRunning = true;
     }
 }
Пример #3
0
        public static BotUser GetEmp(AprajitaRetailsContext db, int empId)
        {
            if (!BotGini.IsGiniRunning())
            {
                Gini.Start();
            }

            BotUser emp = db.TelegramAuthUsers.Where(c => c.EmployeeId == empId).Select(c => new BotUser {
                MobileNo = c.MobileNo, ChatId = c.TelegramChatId
            }).FirstOrDefault();

            return(emp);
        }
Пример #4
0
        public static BotUser GetEmp(AprajitaRetailsContext db, int staffId, bool IsStaffId)
        {
            if (!BotGini.IsGiniRunning())
            {
                Gini.Start();
            }
            string  StaffName = db.Salesmen.Find(staffId).SalesmanName;
            BotUser emp       = db.TelegramAuthUsers.Where(c => c.TelegramUserName == StaffName).Select(c => new BotUser {
                MobileNo = c.MobileNo, ChatId = c.TelegramChatId, StaffName = c.TelegramUserName
            }).FirstOrDefault();

            if (emp == null)
            {
                emp = new BotUser {
                    StaffName = StaffName
                };
            }
            return(emp);
        }