Example #1
0
        public ActionResult EmployeeProfile()
        {
            try
            {
                long            userid        = 0;;
                eTracLoginModel ObjLoginModel = null;
                if (Session["eTrac"] != null)
                {
                    ObjLoginModel = (eTracLoginModel)(Session["eTrac"]);
                }

                //ViewBag.ProjectID = (ObjLoginModel != null && ObjLoginModel.LocationID > 0) ? (ObjLoginModel.LocationID) : 0;
                //userid = (ObjLoginModel != null && ObjLoginModel.UserId > 0) ? (ObjLoginModel.UserId) : 0;
                userid = (ObjLoginModel != null && ObjLoginModel.UserId > 0) ? (ObjLoginModel.UserId) : 0;


                QRCModel _UserModel = new QRCModel();
                ViewBag.Country = _ICommonMethod.GetAllcountries();
                if (userid > 0)
                {
                    ObjectParameter paramTotalrecord = new ObjectParameter("TotalRecords", typeof(int));
                    _UserModel.UserModel  = _IManageManager.GetEmployeeById(userid, "GetUserByID", null, null, null, null, null, paramTotalrecord);
                    _UserModel.UpdateMode = true;
                }
                return(View("EmployeeProfile", _UserModel));
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Example #2
0
 /// <summary>Create
 /// <CreatedBy>Nagendra Upwanshi</CreatedBy>
 /// <CreatedOn>Nov-18-2014</CreatedOn>
 /// <CreatedFor>Load UI for Create New User</CreatedFor>
 /// </summary>
 /// <param name="usr"></param>
 /// <returns></returns>
 public ActionResult Create(string usr)
 {
     try
     {
         ViewBag.Country = _ICommonMethod.GetAllcountries();
         var _UserModel = _ICommonMethod.LoadInvitedUser(usr);
         ViewBag.JobTitleList = _ICommonMethod.GetGlobalCodeData("UserJobTitle");
         ViewBag.LocationList = _IGlobalAdmin.GetAllLocationNew();
         return(View("ITAdministrator", _UserModel));
     }
     catch (Exception ex)
     { ViewBag.Message = ex.Message; ViewBag.AlertMessageClass = ObjAlertMessageClass.Danger; return(View("Error")); }
 }
Example #3
0
        private QRCModel QRCInIt()
        {
            QRCModel ObjQRCModel = new QRCModel();

            try
            {
                ObjQRCModel           = _IQRCSetup.GetGlobalCodeForCategories();
                ObjQRCModel.UserModel = new UserModel();
                ViewBag.Country       = _ICommonMethod.GetAllcountries();
                //ObjQRCModel.VendorID = _IManager.GetAllVendorList(null, null, null, "", null, "");
                ObjQRCModel.UpdateMode = false;
                //ObjQRCModel.QRCTYPE = ObjQRCModel.QRCTypeList.SingleOrDefault(q => q.CodeName == "Vehicle" && q.IsDeleted == false).GlobalCodeId;
            }
            catch (Exception ex) { throw ex; }
            return(ObjQRCModel);
        }
Example #4
0
        public ActionResult Index()
        {
            var objmodel = new VendorSetupManagementModel();

            ViewBag.AccountSection = true;
            eTracLoginModel objLoginSession = new eTracLoginModel();

            objLoginSession = (eTracLoginModel)Session["eTrac"];
            try
            {
                long CountryId = 1;
                ViewBag.Country             = _ICommonMethod.GetAllcountries();
                ViewBag.StateList           = _ICommonMethod.GetStateByCountryId(CountryId);
                ViewBag.JobTitleList        = _ICommonMethod.GetGlobalCodeData("UserJobTitle");
                ViewBag.ClientInvoicingTerm = _IGlobalAdmin.ListClientInvoicingTerm();
                ViewBag.VendorType          = _IVendorManagement.ListVendorType();
                ViewBag.OperatingHolder     = _IGlobalAdmin.ListCompanyHolder(true);
                ViewBag.ContractType        = _IGlobalAdmin.ListContractType();
                ViewBag.PaymentModeList     = _IVendorManagement.PaymentModeList();
                ViewBag.PaymentTermList     = _IVendorManagement.PaymentTermList();
                ViewBag.CostCodeList        = _IVendorManagement.ListAllCostCode();
                ViewBag.LocationListData    = _ICommonMethod.ListAllLocation();
            }
            catch (Exception ex)
            {
                ViewBag.Message = ex.Message; ViewBag.AlertMessageClass = ObjAlertMessageClass.Danger; return(View("Error"));
            }
            return(View("~/Areas/AdminSection/Views/AdminCompany/Index.cshtml", objmodel));//D:\Project\eTrac\WorkOrderEMS\Areas\AdminSection\Views\AdminCompany\CompanyView.cshtml
        }
Example #5
0
        public ActionResult Client(string usr)
        {
            try
            {
                //long userid = 53;
                long userid = 0;

                if (!string.IsNullOrEmpty(usr))
                {
                    usr = Cryptography.GetDecryptedData(usr, true);
                    long.TryParse(usr, out userid);
                }
                QRCModel _UserModel = new QRCModel();
                ViewBag.Country = _ICommonMethod.GetAllcountries();
                if (userid > 0)
                {
                    _UserModel.UserModel = _IClientManager.GetClientById(userid, "GetUserByID", null, null, null, null, null);
                    //_UserModel.Password = Cryptography.GetDecryptedData(_UserModel.Password, true);
                    _UserModel.UserModel.Password = "";
                }
                return(View("Client", _UserModel));
            }


            catch (Exception ex) { ViewBag.Error = ex.Message; return(View("Error")); }
            //ViewBag.UpdateMode = false;
            //return View();
        }