public ActionResult FileAccess(int FileID, FormCollection frm)
        {
            List <User> listUser = new List <User>();

            try
            {
                string        USerNameStatus = "";
                List <string> name           = new List <string>();
                listUser = UserControl.UserAllUser(FileID);
                foreach (string Name in frm)
                {
                    foreach (User User in listUser)
                    {
                        if (User.Username == Name)
                        {
                            USerNameStatus = frm[Name].ToString();
                            FileAccessHelper.SaveFileAccess(FileID, User.UserID, USerNameStatus);
                            User.Rowstatus = Convert.ToChar(USerNameStatus);
                        }
                    }
                }
                TempData["AlertMessage"] = "Sucess";
                return(View(listUser));
            }
            catch
            {
                TempData["AlertMessage"] = "Error";
                return(View(listUser));
            }
        }
        public static bool InsertInitalApproveForCurrentUser(int FileId)
        {
            try
            {
                string      Status        = "D";
                int         CurrentUserId = USerConfig.GetUserID();
                List <User> listUser      = new List <User>();
                listUser = UserControl.GetAllusers();

                foreach (User User in listUser)
                {
                    if (CurrentUserId == User.UserID)
                    {
                        Status = "A";
                    }

                    FileAccessHelper.SaveFileAccess(FileId, User.UserID, Status);
                }

                return(true);
            }
            catch
            {
                throw;
            }
        }