// try //{ // HttpFileCollection hfc = HttpContext.Current.Request.Files; // string path = "/content/files/contact/"; // for (int i = 0; i < hfc.Count; i++) // { // HttpPostedFile hpf = hfc[i]; // if (hpf.ContentLength > 0) // { // string fileName = ""; // if (Request.Browser.Browser == "IE") // { // fileName = Path.GetFileName(hpf.FileName); // } // else // { // fileName = hpf.FileName; // } // string fullPathWithFileName = path + fileName; // hpf.SaveAs(Server.MapPath(fullPathWithFileName)); // } // } //} //catch (Exception ex) //{ // throw ex; //} //public JsonResult InsEmployee(EmployeeSetup emp) //{ // var File = emp.ImageFile; // if (File != null) // { // var sFileName = Path.GetFileName(File.FileName); // var sExt = Path.GetExtension(File.FileName); // var sFileNameWithoutExt = Path.GetFileNameWithoutExtension(File.FileName); // File.SaveAs(Server.MapPath("~/UploadImg/" + File.FileName)); // } // return Json(File.FileName, JsonRequestBehavior.AllowGet); //} //public ActionResult InsEmployee__(string sEmp_empname, string sFatherHindi, string sEmp_PAN, string sEmp_IDProof, string sPhone, string sEmp_empstat, string sEmp_AcNo, string sEmailID, string sOfficial_No, string sResidential_No, string sFatherNo, string sEAcc_empocpno, string sReferenceNm, string sReferenceNo, string sTemporaryAdd, string sPermanentAdd, int mstDept, int iEAcc_empodesg, int iEmp_Gender, int iEmp_empcity, string dEAcc_empojodts, string dEAcc_BirthDts, string BloodGroup, string Aadhar, int BankID, string PfAcNo, string IFSC, string DegreeNM, int DegreeID, string IMG_Path, bool AadharCard, bool VoterId, bool Licence, bool Passport, bool Statement, bool Degree, EmployeeSetup emp) //{ // //var File = emp.ImageFile; // //if (File != null) // //{ // // var sFileName = Path.GetFileName(File.FileName); // // var sExt = Path.GetExtension(File.FileName); // // var sFileNameWithoutExt = Path.GetFileNameWithoutExtension(File.FileName); // // File.SaveAs(Server.MapPath("~/UploadImg/" + File.FileName)); // //} // EmployeeSetup frm = new EmployeeSetup(); // CRM.Models.clsSubmitModel oSubmit = new CRM.Models.clsSubmitModel(); // DataTable dt; // dt = oSubmit.GetData("select isnull(max(empcode),0)+1 empcode from employee"); // frm.iEmp_empcode = Convert.ToInt32(dt.Rows[0]["empcode"]); // frm.Father = sFatherHindi; // frm.iCompCode = 0; // frm.sEmp_empname = sEmp_empname; // frm.sFatherHindi = sFatherHindi; // frm.sEmp_PAN = sEmp_PAN; // frm.sEmp_IDProof = sEmp_IDProof; // frm.sPhone = sPhone; // frm.sEmp_empstat = sEmp_empstat; // frm.sEmp_AcNo = sEmp_AcNo; // frm.sEmailID = sEmailID; // frm.sOfficial_No = sOfficial_No; // frm.sResidential_No = sResidential_No; // frm.sFatherNo = sFatherNo; // frm.sEAcc_empocpno = sEAcc_empocpno; // frm.sReferenceNm = sReferenceNm; // frm.sReferenceNo = sReferenceNo; // frm.sTemporaryAdd = sTemporaryAdd; // frm.sPermanentAdd = sPermanentAdd; // frm.mstDept = mstDept.ToString(); // frm.iEAcc_empodesg = iEAcc_empodesg; // frm.iEmp_Gender = iEmp_Gender; // frm.iEmp_empcity = iEmp_empcity; // frm.Aadhar = Aadhar; // frm.dEAcc_empojodts = dEAcc_empojodts; // frm.BankID = BankID; // if (dEAcc_BirthDts.ToString() != "") frm.dEAcc_BirthDt = oSubmit.GetDateFormat(dEAcc_BirthDts); // frm.PfAcNo = PfAcNo; // frm.sBloodGroup = BloodGroup; // frm.IFSC = IFSC; frm.DegreeNM = DegreeNM; frm.DegreeID = DegreeID; // frm.IMG_Path = IMG_Path; // frm.AadharCard = AadharCard; // frm.VoterId = VoterId; // frm.Licence = Licence; // frm.Passport = Passport; // frm.Statement = Statement; // frm.Degree = Degree; // oSubmit.InsEmployee(frm); // dt = oSubmit.GetData("select isnull(max(empcode),0)+1 empcode from employee"); // frm.iEmp_empcode = Convert.ToInt32(dt.Rows[0]["empcode"]); // return Json(dt.Rows[0]["empcode"], JsonRequestBehavior.AllowGet); // // return RedirectToAction("superDash", "Home"); // //return PartialView("", "Home"); //} public ActionResult _EmpList() { //CRM.Models.clsSubmitModel oSubmit = new CRM.Models.clsSubmitModel(); List <EmployeeSetup> lstFollow = oSubmit.EmployeeList("select usetype as empUserType,empCode iEmp_empcode , dbo.ProperCase(empname) sEmp_empname, PAN sEmp_PAN, Gender iEmp_Gender, ProofNo sEmp_ProofNo, AcNo sEmp_AcNo, Official_No sOfficial_No,Residential_No sResidential_No,ReferenceNm sReferenceNm , ReferenceNo sReferenceNo,FatherNo sFatherNo, TemporaryAdd sTemporaryAdd, PermanentAdd sPermanentAdd,EmailID sEmailID , Aadhar , convert(varchar(20), BirthDt ,103) dEAcc_BirthDts , Father ,IFSC ,DegreeID ,DegreeNM ,empcity iEmp_empcity, empstat sEmp_empstat , BankID ,empDepa mstDept ,empDesi iEAcc_empodesg ,PfAcNo , IMG_Path sPath, IMG_Path ,b.UseName sEmpUser from employee a left join loginusers b on a.UseCode = b.UseCode order by sEmp_empname"); return(PartialView("_EmpList", lstFollow)); }