Esempio n. 1
0
        public ActionResult Add()
        {
            var EmployeeList = CommanService.EmployeeNameList();

            ViewBag.EmployeeList = new SelectList(EmployeeList, "EmployeeID", "Name");
            return(View());
        }
Esempio n. 2
0
        public bool IsValidateUser(string UserName, string UserPassword)
        {
            string Encodedpassword = "";

            try
            {
                commanService = new CommanService();
                var userData = commanService.GetUserName(UserName);
                if (userData == null)
                {
                    MessageBox.Show("Invalid User,Please Check", Comman.Product_Name, MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return(false);
                }

                Encodedpassword = Cryptography.EncryptString(UserPassword);
                if (!(string.Compare(userData.Password, Encodedpassword, StringComparison.Ordinal) == 0))
                {
                    MessageBox.Show("Incorrect Password,Please Check", Comman.Product_Name, MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return(false);
                }
                else
                {
                    Comman.UserId     = userData.id;
                    Comman.UserName   = userData.UserName;
                    Comman.UserTypeId = userData.UserTypeId;
                    return(true);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, Comman.Product_Name, MessageBoxButtons.OK, MessageBoxIcon.Error);
                return(false);
            }
        }
Esempio n. 3
0
        public ActionResult Add()
        {
            var ClientIdList = CommanService.clientIDList();

            ViewBag.ClientList = new SelectList(ClientIdList, "ClientID", "Name");
            return(View());
        }
Esempio n. 4
0
        public ActionResult Edit(int id)
        {
            ExpenseModel mdl = new ExpenseModel();

            mdl = ExpenseService.getExpensebyId(id);
            var EmployeeList = CommanService.EmployeeNameList();

            ViewBag.EmployeeList = new SelectList(EmployeeList, "EmployeeID", "Name");
            return(View("Add", mdl));
        }
Esempio n. 5
0
        private void Populate_Grid(string Comand_text, string tblName)
        {
            CommanService commanService = null;

            try
            {
                commanService = new CommanService();
                if (Comand_text.Trim() == "")
                {
                    return;
                }
                var data = commanService.GetData(Comand_text, tblName);
                Dgrd_Search.DataSource         = data;
                Dgrd_Search.Columns[0].Visible = false;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, Comman.Product_Name, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Esempio n. 6
0
        public ActionResult GetClalendarEvent()
        {
            var list = CommanService.GetCalanderFollowup();

            return(Json(list, JsonRequestBehavior.AllowGet));
        }