Пример #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Utility   u   = new Utility();
                StaffList sl1 = new StaffList(); sl1.LoadList(DateTime.Now, true);
                foreach (SimpleStaff s in sl1.m_stafflist)
                {
                    DropDownList_staff.Items.Add(s.m_StaffCode);
                }
                TimetableControl1.type = TT_writer.TimetableType.Booking;
#if DEBUG
                TimetableControl1.BaseId = new Guid(u.Get_StaffID("CC"));
                if (u.CheckStaffInConfigGroup("CC", "PhysicsExptSupervisor"))
                {
                    Label_ActAs.Visible = true; DropDownList_staff.Visible = true;
                }
#else
                TimetableControl1.BaseId = u.GetsStaffIdfromRequest(Request);
                //TimetableControl1.BaseId = u.GetStaffIDfromContext(Context);
                if (u.CheckStaffInConfigGroup(Context, "PhysicsExptSupervisor"))
                {
                    Label_ActAs.Visible = true; DropDownList_staff.Visible = true;
                }
#endif
            }
        }
Пример #2
0
 protected void SetupList()
 {
     if (RadioButtonList1.SelectedValue == "Staff")
     {
         StaffList stl1 = new StaffList(); stl1.LoadList(DateTime.Now, true);
         ListBox_staff.Items.Clear();
         foreach (SimpleStaff s1 in stl1.m_stafflist)
         {
             ListItem l = new ListItem(s1.m_StaffCode, s1.m_StaffId.ToString());
             ListBox_staff.Items.Add(l);
         }
     }
     if (RadioButtonList1.SelectedValue == "Subjects")
     {
         ListBox_staff.Items.Clear();
         CourseList cl1 = new CourseList(5);
         foreach (Course c in cl1._courses)
         {
             ListItem l = new ListItem(c.CourseCode, c._CourseID.ToString());
             ListBox_staff.Items.Add(l);
         }
     }
     if (RadioButtonList1.SelectedValue == "All")
     {
         StaffList stl1 = new StaffList(); stl1.LoadList(DateTime.Now, true);
         ListBox_staff.Items.Clear();
         foreach (SimpleStaff s1 in stl1.m_stafflist)
         {
             ListItem l = new ListItem(s1.m_StaffCode, s1.m_StaffId.ToString());
             ListBox_staff.Items.Add(l); l.Selected = true;
         }
     }
 }
 public ActionResult Login(LoginViewModel model)
 {
     try
     {
         StaffList obj = db.StaffList.SingleOrDefault(m => m.Username == model.Username && m.Password == model.Password && m.IsDelete == false && m.IsUser == true);
         if (obj == null)
         {
             Exception e = new Exception("Incorrect user access. Unauthorized Access.");
             return(View("Error", new HandleErrorInfo(e, "Home", "Login")));
         }
         else
         {
             if (model.RememberMe)
             {
                 HttpCookie cookie = new HttpCookie("UserLogin");
                 cookie.Values.Add("Username", model.Username);
                 cookie.Values.Add("Password", model.Password);
                 cookie.Expires = DateTime.Now.AddDays(715);
                 Response.Cookies.Add(cookie);
             }
             GlobalClass.MasterSession = true;
             GlobalClass.LoginUser     = obj;
             EM.EM_AdminAccess.SetUserAccess((Guid)obj.Usergr);
             GlobalClass.Company = db.Company.SingleOrDefault(m => m.CompanyKey == obj.CompanyKey);
             return(RedirectToAction("MainDashBoard", "Home"));
         }
     }
     catch (Exception e)
     {
         return(View("Error", new HandleErrorInfo(e, "Home", "Login")));
     }
 }
Пример #4
0
 private void SaveStaff()
 {
     if (MessageBox.Show("You are about to Save new Staff. Do you really want to proceed?", MessageBoxCaption, MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.No)
     {
         return;
     }
     try
     {
         using (SqlConnection Conn = new SqlConnection(GlobalClass.TConnectionString))
         {
             Conn.Open();
             using (SqlTransaction tran = Conn.BeginTransaction())
             {
                 if ((int)Conn.ExecuteScalar(string.Format("SELECT COUNT(BARCODE) FROM tblStaff WHERE BARCODE = '{0}'", staff.BARCODE), transaction: tran) > 0)
                 {
                     MessageBox.Show("Barcode already exists. Barcode cannot be duplicate.", MessageBoxCaption, MessageBoxButton.OK, MessageBoxImage.Exclamation);
                     return;
                 }
                 staff.Save(tran);
                 GlobalClass.SetUserActivityLog(tran, "Staff Registration", "New", WorkDetail: "BARCODE : " + staff.BARCODE, Remarks: staff.FULLNAME);
                 tran.Commit();
             }
             MessageBox.Show("Staff Saved Successfully", MessageBoxCaption, MessageBoxButton.OK, MessageBoxImage.Information);
             StaffList.Add(staff);
             ExecuteUndo(null);
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(GlobalClass.GetRootException(ex).Message, MessageBoxCaption, MessageBoxButton.OK, MessageBoxImage.Error);
     }
 }
Пример #5
0
        // Constructor
        public RSEntryViewModel(IEventAggregator eventAggregator, IRegionManager regionManager, IPersonService personService, IClientService clientService,
                                IRecordSearchService recordSearchService, IStaffService staffService, IApplicationCommands applicationCommands) : base(applicationCommands)
        {
            _ea        = eventAggregator;
            _rm        = regionManager;
            _rss       = recordSearchService;
            _ps        = personService;
            _cs        = clientService;
            _ss        = staffService;
            PeopleList = personService.CompletePeopleList;
            ClientList = clientService.CompleteClientList;
            StaffList  = staffService.CompleteStaffList;
            StaffList.Insert(0, new Staff());

            regionManager.RegisterViewWithRegion("RequestorAddress", typeof(AddressEntry));
            regionManager.RegisterViewWithRegion("BillingAddress", typeof(AddressEntry));
            regionManager.RegisterViewWithRegion("CalculatorRegion", typeof(Calculator));


            ChangeFileNumCommand     = new DelegateCommand(ChangeFileNum);
            NavigateCommand          = new DelegateCommand <string>(Navigate);
            GoBackCommand            = new DelegateCommand(GoBack);
            CountySelectPopupCommand = new DelegateCommand(RaiseCountySelectPopup);
            CopyRequestorCommand     = new DelegateCommand <string>(CopyRequestor);
            CopyClientCommand        = new DelegateCommand <string>(CopyAffiliation);

            ChangeFileNumRequest      = new InteractionRequest <IChangeICFileNumberNotification>();
            CountySelectRequest       = new InteractionRequest <IAdditionalCountyNotification>();
            DeleteConfirmationRequest = new InteractionRequest <IConfirmation>();

            eventAggregator.GetEvent <AdditionalCountySelectionEvent>().Subscribe(ChangeAdditionalCounties);
        }
Пример #6
0
 private void UpdateStaff()
 {
     if (MessageBox.Show("Are you sure you want to Edit this Staff?", MessageBoxCaption, MessageBoxButton.YesNo, MessageBoxImage.Question) != MessageBoxResult.Yes)
     {
         return;
     }
     try
     {
         using (SqlConnection Conn = new SqlConnection(GlobalClass.TConnectionString))
         {
             Conn.Open();
             using (SqlTransaction tran = Conn.BeginTransaction())
             {
                 string Remarks = Newtonsoft.Json.JsonConvert.SerializeObject(Conn.Query <Shift>("SELECT * FROM tblStaff WHERE BARCODE = @BARCODE", staff, tran).First());
                 staff.Update(tran);
                 GlobalClass.SetUserActivityLog(tran, "Staff Registration", "Edit", WorkDetail: "BARCODE : " + staff.BARCODE, Remarks: Remarks);
                 tran.Commit();
             }
             MessageBox.Show("Staff Updated Successfully.", MessageBoxCaption, MessageBoxButton.OK, MessageBoxImage.Information);
             var pa = StaffList.First(x => x.BARCODE == staff.BARCODE);
             pa.FULLNAME    = staff.FULLNAME;
             pa.ADDRESS     = staff.ADDRESS;
             pa.DESIGNATION = staff.DESIGNATION;
             pa.REMARKS     = staff.REMARKS;
             pa.STATUS      = staff.STATUS;
             pa.BCODE       = staff.BCODE;
             ExecuteUndo(null);
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Пример #7
0
        private void LoadStaff()
        {
            StaffList.Clear();
            var sqlData = new StaffQuery().SelectAllNotRetirement();

            if (sqlData.HasRows)
            {
                while (sqlData.Read())
                {
                    StaffDTO dto = new StaffDTO
                    {
                        STAFF_IDNUMBER       = sqlData["idnumber"].ToString(),
                        STAFF_DEPT           = sqlData["dept"].ToString(),
                        STAFF_RANK           = sqlData["rank"].ToString(),
                        STAFF_NAME           = sqlData["name"].ToString(),
                        STAFF_ADDRESS        = sqlData["address"].ToString(),
                        STAFF_TEL            = sqlData["tel"].ToString(),
                        STAFF_JOIN_DAY       = sqlData["join_day"].ToString(),
                        STAFF_RETIREMENT_DAY = sqlData["retirement_day"].ToString(),
                        STAFF_STATE          = sqlData["state"].ToString()
                    };
                    StaffList.Add(new StaffModel(dto));
                }
                sqlData.Close();
                SharedPreference.Instance.DBM.SqlConn.Close();
            }
            else
            {
                sqlData.Close();
                SharedPreference.Instance.DBM.SqlConn.Close();
            }
        }
Пример #8
0
        public ActionResult Login(string username, string password)
        {
            try
            {
                StaffList obj = db.StaffList.SingleOrDefault(m => m.Username == username && m.Password == password && m.IsDelete == false && m.IsUser == true);
                if (obj == null)
                {
                    Exception e = new Exception("Incorrect user access.");
                    return(View("Error", new HandleErrorInfo(e, "UserHome", "Login")));
                }
                else
                {
                    GlobalClass.LoginUser = obj;

                    GlobalClass.Company = db.Company.SingleOrDefault(m => m.CompanyKey == obj.CompanyKey);
                    //GlobalClass.Company = db.Company.FirstOrDefault();
                    //GlobalClass.Warehouse = db.Warhouse.FirstOrDefault();
                    GlobalClass.SystemSession = true;
                    return(RedirectToAction("Index", "UserHome"));
                }
            }
            catch (DivideByZeroException e)
            {
                return(View("Error", new HandleErrorInfo(e, "UserHome", "Login")));
            }
        }
Пример #9
0
 /// <summary>
 /// constructor to create the console view, send all major data objects
 /// </summary>
 /// <param name="myPlayer">active player object</param>
 /// <param name="hall">current hall object</param>
 /// <param name="hall">current guest list object</param>
 public ConsoleView(Player myPlayer, Hall hall, GuestList guests, StaffList staff)
 {
     _myPlayer = myPlayer;
     _hall = hall;
     _guestList = guests;
     _staffList = staff;
     InitializeConsoleWindow();
 }
Пример #10
0
        public ActionResult DeleteConfirmed(Guid id)
        {
            StaffList staffList = db.StaffList.Find(id);

            db.StaffList.Remove(staffList);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Пример #11
0
 private void Execute_Reset(object obj)
 {
     var p = (SfDataGrid)obj;
     p.SearchHelper.ClearSearch();
     var UID = session.AccountID;
     var res = staffRepository.Get(s => s.Account_id != UID);
     StaffList.Clear();
     res.Distinct().ToList().ForEach(i => StaffList.Add(i));
 }
Пример #12
0
        public ActionResult List(string code)
        {
            GetData();
            IEnumerable <staff> StaffList;

            StaffList           = StaffRepository.GetStaffByStatus(code);
            ViewBag.RecordCount = StaffList.Count();

            return(PartialView(StaffList));
        }
Пример #13
0
        public void Serialize()
        {
            XmlSerializer serializer = new XmlSerializer(StaffList.GetType());

            using (FileStream aFile = new FileStream(fileName, FileMode.Create, FileAccess.Write))
                using (StreamWriter streamWriter = new StreamWriter(aFile))
                {
                    serializer.Serialize(streamWriter, StaffList);
                }
        }
Пример #14
0
        protected void Page_Load(object sender, EventArgs e)
        {
            StaffList sl1 = new StaffList(); sl1.LoadList(DateTime.Now, true);

            foreach (SimpleStaff s in sl1.m_stafflist)
            {
                ListItem l = new ListItem(s.m_StaffCode + " : " + s.m_PersonGivenName + " " + s.m_PersonSurname, s.m_StaffId.ToString());
                ListBox_staff.Items.Add(l);
            }
        }
Пример #15
0
        public ActionResult Edit(StaffList staffList, HttpPostedFileBase file)
        {
            if (GlobalClass.SystemSession)
            {
                ViewBag.mess = "";
                bool flag = true;
                if (string.IsNullOrEmpty(staffList.PID))
                {
                }
                else
                {
                    var uid = from x in db.StaffList where x.PID == staffList.PID && x.PersonnelKey != staffList.PersonnelKey && x.CompanyKey == GlobalClass.Company.CompanyKey select x;
                    if (uid.Count() > 0)
                    {
                        ViewBag.mess = "Duplicate ID";
                        flag         = false;
                    }
                    else
                    {
                    }
                }
                if (flag == true)
                {
                    StaffList model = db.StaffList.Find(staffList.PersonnelKey);
                    if (file != null)
                    {
                        byte[] data = null;

                        data          = BufferFromImage(file, 50, 80);
                        model.Pic     = data;
                        model.PicType = file.ContentType;
                    }
                    model.PID         = staffList.PID;
                    model.PName       = staffList.PName;
                    model.Mobile      = staffList.Mobile;
                    model.Department  = staffList.Department;
                    model.Designation = staffList.Designation;
                    model.Username    = staffList.Username;
                    model.Usergr      = staffList.Usergr;
                    model.Mail        = staffList.Mail;
                    db.SaveChanges();
                    return(RedirectToAction("Index"));
                }

                ViewBag.Usergr = new SelectList(db.Usergroup, "UserGroupKey", "GroupName", staffList.Usergr);
                return(View(staffList));
            }
            else
            {
                Exception e = new Exception("Sorry, your Session has Expired");
                return(View("Error", new HandleErrorInfo(e, "UserHome", "Logout")));
            }
        }
Пример #16
0
        private void BuildNamesList(string type)
        {
            NameList.Items.Clear();
            if (type == "staff")
            {
                StaffList stlist1 = new StaffList(); stlist1.LoadList(DateTime.Now, true);
                foreach (SimpleStaff s in stlist1.m_stafflist)
                {
                    ListItem l = new ListItem(s.m_PersonGivenName + " " + s.m_PersonSurname + "-" + s.m_StaffCode, s.m_StaffId.ToString()); NameList.Items.Add(l);
                }
                Label_Year.Text      = "Type to search on name or code.";
                TextBox_mask.Visible = true;
                Display_List.Items.FindByValue("Details").Enabled = true;
                Display_List.Items.FindByValue("Incidents Authored by").Enabled = true;
            }
            if (type == "room")
            {
                RoomList rmlist1 = new RoomList(); rmlist1.LoadList();
                foreach (SimpleRoom r in rmlist1.m_roomlist)
                {
                    ListItem l = new ListItem(r.m_roomcode, r.m_RoomID.ToString()); NameList.Items.Add(l);
                }
                Label_Year.Text = "Rooms";
                RadioButtonList_StaffType.Visible = false;
            }

            if (type == "Currentstaff")
            {
                StaffList stlist1 = new StaffList(); stlist1.LoadList(DateTime.Now, false);
                foreach (SimpleStaff s in stlist1.m_stafflist)
                {
                    ListItem l = new ListItem(s.m_PersonGivenName + " " + s.m_PersonSurname + "-" + s.m_StaffCode, s.m_StaffId.ToString()); NameList.Items.Add(l);
                }
                Label_Year.Text      = "Type to search on name or code.";
                TextBox_mask.Visible = true;
                Display_List.Items.FindByValue("Details").Enabled = true;
                Display_List.Items.FindByValue("Incidents Authored by").Enabled = true;
            }

            if (type == "Allstaff")
            {
                StaffList stlist1 = new StaffList(); stlist1.LoadFullList();
                foreach (SimpleStaff s in stlist1.m_stafflist)
                {
                    ListItem l = new ListItem(s.m_PersonGivenName + " " + s.m_PersonSurname + "-" + s.m_StaffCode, s.m_StaffId.ToString()); NameList.Items.Add(l);
                }
                Label_Year.Text      = "Type to search on name or code.";
                TextBox_mask.Visible = true;
                Display_List.Items.FindByValue("Details").Enabled = true;
                Display_List.Items.FindByValue("Incidents Authored by").Enabled = true;
            }
        }
        // GET: MgtStaff
        public ActionResult Details(Guid?id)
        {
            try
            {
                StaffList staffList = db.StaffList.Find(id);

                return(View(staffList));
            }
            catch (Exception e)
            {
                return(View("Error", new HandleErrorInfo(e, "Home", "Index")));
            }
        }
        // GET: MgtStaff
        public ActionResult MyProfile()
        {
            try
            {
                StaffList staffList = db.StaffList.Find(GlobalClass.LoginUser.PersonnelKey);

                return(View(staffList));
            }
            catch (Exception e)
            {
                return(View("Error", new HandleErrorInfo(e, "Home", "Index")));
            }
        }
 public ActionResult DDelete(Guid?id)
 {
     try
     {
         StaffList staffList = db.StaffList.Find(id);
         staffList.IsDelete = true;
         db.SaveChanges();
         return(RedirectToAction("DIndex"));
     }
     catch (Exception e)
     {
         return(View("Error", new HandleErrorInfo(e, "Home", "Index")));
     }
 }
Пример #20
0
        public ActionResult MyProfile(Guid?id)
        {
            if (GlobalClass.SystemSession)
            {
                StaffList staffList = db.StaffList.Find(GlobalClass.LoginUser.PersonnelKey);

                return(View(staffList));
            }
            else
            {
                Exception e = new Exception("Sorry, your Session has Expired");
                return(View("Error", new HandleErrorInfo(e, "UserHome", "Logout")));
            }
        }
Пример #21
0
        public ActionResult GetUserPic(Guid id)
        {
            StaffList obj = db.StaffList.SingleOrDefault(m => m.PersonnelKey == id);

            if (obj.Pic != null)
            {
                return(File(obj.Pic, obj.PicType));
            }
            else
            {
                ImageFile faoimagefile = db.ImageFile.Single(f => f.ImageFileKey == 1);
                return(File(faoimagefile.FileContent, faoimagefile.FileType));
            }
        }
        public ActionResult EditMyProfile()
        {
            try
            {
                StaffList staffList = db.StaffList.Find(GlobalClass.LoginUser.PersonnelKey);
                ViewBag.mess = "";

                ViewBag.Usergr = new SelectList(db.Usergroup, "UserGroupKey", "GroupName", staffList.Usergr);
                return(View(staffList));
            }
            catch (Exception e)
            {
                return(View("Error", new HandleErrorInfo(e, "Home", "DIndex")));
            }
        }
        /// <summary>
        /// initialize the staff list from the room staff information
        /// </summary>
        public void InitializeStaffList()
        {
            _staffList = new StaffList();

            int staffNumber = 0;

            foreach (Room room in _hall.Rooms)
            {
                if (room.RoomStaff != null)
                {
                    _staffList.Staff[staffNumber] = room.RoomStaff;
                    staffNumber++;
                }
            }
        }
Пример #24
0
 // GET: Staff/Delete/5
 public ActionResult Delete(Guid?id)
 {
     if (GlobalClass.SystemSession)
     {
         StaffList staffList = db.StaffList.Find(id);
         staffList.IsDelete = true;
         db.SaveChanges();
         return(RedirectToAction("DIndex"));
     }
     else
     {
         Exception e = new Exception("Sorry, your Session has Expired");
         return(View("Error", new HandleErrorInfo(e, "UserHome", "Logout")));
     }
 }
        public ActionResult DEdit(Guid?id)
        {
            try
            {
                StaffList staffList = db.StaffList.Find(id);
                ViewBag.mess = "";

                ViewBag.Usergr = new SelectList(db.Usergroup, "UserGroupKey", "GroupName", staffList.Usergr);
                return(View(staffList));
            }
            catch (Exception e)
            {
                return(View("Error", new HandleErrorInfo(e, "Home", "DIndex")));
            }
        }
Пример #26
0
 public ActionResult Delete(Guid?id)
 {
     if (GlobalClass.SystemSession)
     {
         Usergroup company = db.Usergroup.Find(id);
         var       temp    = from x in db.UserGroupForm where x.UserGroupKey == id select x;
         var       temp2   = from x in db.UserGroupModule where x.UserGroupKey == id select x;
         var       temp3   = from x in db.StaffList where x.Usergr == id select x;
         if (temp.Count() > 0)
         {
             foreach (var a in temp)
             {
                 HasanHoutoneEntities ac   = new HasanHoutoneEntities();
                 UserGroupForm        form = db.UserGroupForm.Find(a.UserGroupFormKey);
                 ac.UserGroupForm.Remove(form);
                 ac.SaveChanges();
             }
         }
         if (temp3.Count() > 0)
         {
             foreach (var a in temp3)
             {
                 HasanHoutoneEntities ac   = new HasanHoutoneEntities();
                 StaffList            form = db.StaffList.Find(a.PersonnelKey);
                 form.Usergr = null;
                 ac.SaveChanges();
             }
         }
         if (temp2.Count() > 0)
         {
             foreach (var a in temp2)
             {
                 HasanHoutoneEntities ac   = new HasanHoutoneEntities();
                 UserGroupModule      form = db.UserGroupModule.Find(a.UserGroupModuleKey);
                 ac.UserGroupModule.Remove(form);
                 ac.SaveChanges();
             }
         }
         db.Usergroup.Remove(company);
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     else
     {
         Exception e = new Exception("Sorry, your Session has Expired");
         return(View("Error", new HandleErrorInfo(e, "UserHome", "Logout")));
     }
 }
Пример #27
0
        public Boolean addNewStaffMember(string firstname, string lastname, object userType, string pps, string phone, string email, int hod)
        {
            string userID = firstname + "." + lastname;

            // some validation on userID. No duplicate userIDs;
            //IUser duplicateUser = this.StaffList.FirstOrDefault(user => user.UserID == userID.Trim());

            //if (duplicateUser != null)
            //    return false;
            //else
            //{
            try
            {
                int    count = 0;
                string id    = userID;
                foreach (IUser user in UserList)
                {
                    if (user.FirstName.Equals(firstname) && user.LastName.Equals(lastname))
                    {
                        count++;
                    }
                }
                if (count == 1)
                {
                }
                else
                {
                    count--;
                    userID += count.ToString();
                }


                IStaff theUser = UserFactory.GetStaffMember(userID, hod, pps, email, phone, userType.ToString());

                IUser usernameDetails = UserList.FirstOrDefault(user => user.UserID == theUser.UserID);
                theUser.FirstName = usernameDetails.FirstName;
                theUser.LastName  = usernameDetails.LastName;

                StaffList.Add(theUser);                   // Add a reference to the newly created object to the Models UserList
                DataLayer.addNewStaffMemberToDB(theUser); //Gets the DataLayer to add the new user to the DB.
                return(true);
            }
            catch (System.Exception excep)
            {
                return(false);
            }
            //}
        }
Пример #28
0
        // GET: Staff/Edit/5
        public ActionResult Edit(Guid?id)
        {
            if (GlobalClass.SystemSession)
            {
                StaffList staffList = db.StaffList.Find(id);
                ViewBag.mess = "";

                ViewBag.Usergr = new SelectList(db.Usergroup, "UserGroupKey", "GroupName", staffList.Usergr);
                return(View(staffList));
            }
            else
            {
                Exception e = new Exception("Sorry, your Session has Expired");
                return(View("Error", new HandleErrorInfo(e, "UserHome", "Logout")));
            }
        }
Пример #29
0
 public Company()
 {
     AllProducts = new ProductList();// new List<Product>();
     AllProjects = new List<Project>();
     AllEmployees = new StaffList();
     CEO = new CEO();
     AllEmployees.Add(CEO);
     Accounting = new Accounting(1500000);
     Office = new Office();
     Office.PhysicalObjectsInOffice.Add(AllEmployees);
     //BusinessCycles.ProjectCreated += new ProjectCreatedEventHandler(BusinessCycles_ProjectCreated);
     Accounting.ProfitableItems.Add(AllProducts);
     Accounting.IndebtedItems.Add(AllEmployees);
     Accounting.IndebtedItems.Add(Office);
     Accounting.IndebtedItems.Add(AllProducts);
 }
Пример #30
0
        public GreatStaffModel()
        {
            Uri uri = new Uri(AppDomain.CurrentDomain.BaseDirectory + @"/MetDemo.ttf");

            Metdemo = new FontFamily(uri, "MetDemo");

            Uri uri2 = new Uri(AppDomain.CurrentDomain.BaseDirectory + @"/NoteHedz170.ttf");

            Notehedz = new FontFamily(uri2, "NoteHedz");

            StaffList.Add(new StaffModel()
            {
                Number = 1
            });
            StaffList.Add(new StaffModel()
            {
                Number = 2
            });
        }
Пример #31
0
        public ActionResult DisplayStaff()
        {
            IEnumerable <staff> StaffList;

            StaffList           = StaffRepository.GetStaffByStatus("Active");
            ViewBag.RecordCount = StaffList.Count();

            foreach (staff s in StaffList)
            {
                if (s.pictureID == null)
                {
                    s.pictureID = 0;
                }
                s.picture            = PictureResponsibility.GetStaffPicture((int)s.pictureID);
                s.mainResponsibility = ResponsibilityRepository.GetStaffPrimaryResponsibility(s.staffID);
            }

            return(PartialView(StaffList));
        }
Пример #32
0
 private void h_TestFill()
 {
     StaffList.Add(new CStaff()
     {
         Fio       = "q1 w e",
         BirthDate = new DateTime(2000, 10, 01),
         RankTitle = "rank1"
     });
     StaffList.Add(new CStaff()
     {
         Fio       = "q2 w e",
         BirthDate = new DateTime(1990, 10, 01),
         RankTitle = "rank2"
     });
     StaffList.Add(new CStaff()
     {
         Fio       = "q3 w e",
         BirthDate = new DateTime(2000, 10, 01),
         RankTitle = "rank3"
     });
 }
        public ActionResult ChangePass(StaffClass model, string Save)
        {
            if (GlobalClass.SystemSession)
            {
                if (!string.IsNullOrEmpty(Save))
                {
                    StaffList staffList = db.StaffList.Find(model.PersonnelKey);
                    staffList.IsUser = true;

                    staffList.Password = model.Password;
                    db.SaveChanges();
                    return(RedirectToAction("Index", "UserHome"));
                }
                return(View(model));
            }
            else
            {
                Exception e = new Exception("Sorry, your Session has Expired");
                return(View("Error", new HandleErrorInfo(e, "UserHome", "Logout")));
            }
        }
 public async Task<StaffList.response> StaffList(StaffList.request request, CancellationToken? token = null)
 {
     return await SendAsync<StaffList.response>(request.ToXmlString(), token.GetValueOrDefault(CancellationToken.None));
 }
Пример #35
0
	void Awake()
	{
		_staffList = HospitalPrefabs.ScriptsObject.GetComponent<StaffList>();
		_hiredList = HospitalPrefabs.ScriptsObject.GetComponent<HiredStaffManager>();
	}