public ActionResult Add() { var EmployeeList = CommanService.EmployeeNameList(); ViewBag.EmployeeList = new SelectList(EmployeeList, "EmployeeID", "Name"); return(View()); }
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); } }
public ActionResult Add() { var ClientIdList = CommanService.clientIDList(); ViewBag.ClientList = new SelectList(ClientIdList, "ClientID", "Name"); return(View()); }
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)); }
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); } }
public ActionResult GetClalendarEvent() { var list = CommanService.GetCalanderFollowup(); return(Json(list, JsonRequestBehavior.AllowGet)); }