Example #1
0
        private void GetUserAccess()
        {
            oUser    = new DataAccess.User();
            oMConfig = new Model.UserConfig();

            foreach (DataRow row in oUser.GetUserAccess(eVariable.sRole).Rows)
            {
                oMConfig.BookDetail      = Convert.ToBoolean(row["BookDetails"]);
                oMConfig.BookEntry       = Convert.ToBoolean(row["BookEntry"]);
                oMConfig.BookAuthor      = Convert.ToBoolean(row["BookAuthor"]);
                oMConfig.BookCategory    = Convert.ToBoolean(row["BookCategory"]);
                oMConfig.BookLocation    = Convert.ToBoolean(row["BookLocation"]);
                oMConfig.BookPolicy      = Convert.ToBoolean(row["BookPolicy"]);
                oMConfig.BorrowerDetails = Convert.ToBoolean(row["BorrowerDetails"]);
                oMConfig.BorrowerEntry   = Convert.ToBoolean(row["BorrowerEntry"]);
                oMConfig.BorrowBook      = Convert.ToBoolean(row["BorrowBook"]);
                oMConfig.ReturnBook      = Convert.ToBoolean(row["ReturnBook"]);
                oMConfig.PayBook         = Convert.ToBoolean(row["PayBook"]);
                oMConfig.BorrowerRequest = Convert.ToBoolean(row["BorrowerRequest"]);
                oMConfig.UserAccount     = Convert.ToBoolean(row["UserAccount"]);
                oMConfig.UserAccess      = Convert.ToBoolean(row["UserAccess"]);
                oMConfig.UserRole        = Convert.ToBoolean(row["UserRole"]);
                oMConfig.ImportExport    = Convert.ToBoolean(row["ImportExport"]);
                oMConfig.RBookList       = Convert.ToBoolean(row["RBookList"]);
                oMConfig.RBorrowerList   = Convert.ToBoolean(row["RBorrowerList"]);
                oMConfig.ResetData       = Convert.ToBoolean(row["ResetData"]);
            }
        }
Example #2
0
        private void LoadAccess(string sRole)
        {
            oUser           = new DataAccess.User();
            oMUserConfig    = new Model.UserConfig();
            oCommonFunction = new CommonFunction.CommonFunction();

            foreach (DataRow row in oUser.GetUserAccess(sRole).Rows)
            {
                oMUserConfig.BookDetail      = Convert.ToBoolean(row["BookDetails"]);
                oMUserConfig.BookEntry       = Convert.ToBoolean(row["BookEntry"]);
                oMUserConfig.BookAuthor      = Convert.ToBoolean(row["BookAuthor"]);
                oMUserConfig.BookCategory    = Convert.ToBoolean(row["BookCategory"]);
                oMUserConfig.BookLocation    = Convert.ToBoolean(row["BookLocation"]);
                oMUserConfig.BookPolicy      = Convert.ToBoolean(row["BookPolicy"]);
                oMUserConfig.BorrowerDetails = Convert.ToBoolean(row["BorrowerDetails"]);
                oMUserConfig.BorrowerEntry   = Convert.ToBoolean(row["BorrowerEntry"]);
                oMUserConfig.BorrowBook      = Convert.ToBoolean(row["BorrowBook"]);
                oMUserConfig.ReturnBook      = Convert.ToBoolean(row["ReturnBook"]);
                oMUserConfig.PayBook         = Convert.ToBoolean(row["PayBook"]);
                oMUserConfig.BorrowerRequest = Convert.ToBoolean(row["BorrowerRequest"]);
                oMUserConfig.UserAccount     = Convert.ToBoolean(row["UserAccount"]);
                oMUserConfig.UserAccess      = Convert.ToBoolean(row["UserAccess"]);
                oMUserConfig.UserRole        = Convert.ToBoolean(row["UserRole"]);
                oMUserConfig.ImportExport    = Convert.ToBoolean(row["ImportExport"]);
                oMUserConfig.RBookList       = Convert.ToBoolean(row["RBookList"]);
                oMUserConfig.RBorrowerList   = Convert.ToBoolean(row["RBorrowerList"]);
            }


            chkBookDetail.Checked      = oMUserConfig.BookDetail;
            chkBookEntry.Checked       = oMUserConfig.BookEntry;
            chkAuthor.Checked          = oMUserConfig.BookAuthor;
            chkCategory.Checked        = oMUserConfig.BookCategory;
            chkLocation.Checked        = oMUserConfig.BookLocation;
            chkPolicy.Checked          = oMUserConfig.BookPolicy;
            chkBorrowerDetails.Checked = oMUserConfig.BorrowerDetails;
            chkBorrowerEntry.Checked   = oMUserConfig.BorrowerEntry;
            chkBorrowBook.Checked      = oMUserConfig.BorrowBook;
            chkReturnBook.Checked      = oMUserConfig.ReturnBook;
            chkPayBook.Checked         = oMUserConfig.PayBook;
            chkBorrowerRequest.Checked = oMUserConfig.BorrowerRequest;
            chkUserAccount.Checked     = oMUserConfig.UserAccount;
            chkUserAccess.Checked      = oMUserConfig.UserAccess;
            chkUserRole.Checked        = oMUserConfig.UserRole;
            chkImportExport.Checked    = oMUserConfig.ImportExport;
            chkRBookList.Checked       = oMUserConfig.RBookList;
            chkRBorrowerList.Checked   = oMUserConfig.RBorrowerList;
            oMUserConfig.ROLE          = oMUserConfig.ROLE;
        }
Example #3
0
 public static ViewModel.UserConfigForIndexView ConvertUserConfigForIndexView(this Model.UserConfig config)
 {
     return(Mapper.Map <Model.UserConfig, ViewModel.UserConfigForIndexView>(config));
 }