Exemplo n.º 1
0
 public ActionResult Create([Bind(Exclude = "DeptCode")] tblDepartment department)
 {
     if (ModelState.IsValid)
     {
         db.tblDepartments.Add(department);
         db.SaveChanges();
     }
     return(Json(department, JsonRequestBehavior.AllowGet));
 }
 public ActionResult Create(tblSection section)
 {
     if (ModelState.IsValid)
     {
         db.tblSections.Add(section);
         db.SaveChanges();
     }
     return(Json(section, JsonRequestBehavior.AllowGet));
 }
 public ActionResult Create([Bind(Exclude = "EmpTypecode")] tblEmployeeType employeeType)
 {
     if (ModelState.IsValid)
     {
         db.tblEmployeeTypes.Add(employeeType);
         db.SaveChanges();
     }
     return(Json(employeeType, JsonRequestBehavior.AllowGet));
 }
        public ActionResult Create([Bind(Include = "DivCode,Division")] tblDivision tblDivision)
        {
            if (ModelState.IsValid)
            {
                db.tblDivisions.Add(tblDivision);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(tblDivision));
        }
Exemplo n.º 5
0
        public ActionResult Create([Bind(Include = "EmpCode,AttDate,InHour,InMinute,OutHour,OutMinute,AttStatus,TotalRegularHour,Remarks")] tblAttendence tblAttendence)
        {
            if (ModelState.IsValid)
            {
                db.tblAttendences.Add(tblAttendence);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.EmpCode = new SelectList(db.tblEmployees, "EmpCode", "EmpName", tblAttendence.EmpCode);
            return(View(tblAttendence));
        }
Exemplo n.º 6
0
        public ActionResult Create([Bind(Include = "TRCode,TRDate,OldDeptCode,NewDeptCode,OldDesignationCode,NewDesigtnationCode,OldSecCode,NewSecCode,OldDivCode,NewDivCode,TrActivateDate,EmpCode,StateStatus,Remarks,EmpName")] tbleTransferInfo tbleTransferInfo)
        {
            if (ModelState.IsValid)
            {
                db.tbleTransferInfoes.Add(tbleTransferInfo);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.EmpCode = new SelectList(db.tblEmployees, "EmpCode", "EmpName", tbleTransferInfo.EmpCode);
            return(View(tbleTransferInfo));
        }
        public ActionResult Create([Bind(Include = "BenefitCode,EmpCode,BenefitAmount,BenefitDate,BenefitType,PreviousNetSalary,NewNetSalary,Gross,Basic,HouseRent,Medical,ConvenceAll,CashIntensive,launceAllowance,otherAllowance,StateStatus,BenifitActiveDate,Remarks")] tblBenefit tblBenefit)
        {
            if (ModelState.IsValid)
            {
                db.tblBenefits.Add(tblBenefit);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.EmpCode = new SelectList(db.tblEmployees, "EmpCode", "EmpName", tblBenefit.EmpCode);
            return(View(tblBenefit));
        }
        public ActionResult Create([Bind(Include = "DesigCode,Designation,DeptCode")] tblDesignation tblDesignation)
        {
            if (ModelState.IsValid)
            {
                db.tblDesignations.Add(tblDesignation);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.DeptCode = new SelectList(db.tblDepartments, "DeptCode", "DepartmentName", tblDesignation.DeptCode);
            return(View(tblDesignation));
        }
Exemplo n.º 9
0
        public ActionResult Create([Bind(Include = "EmpCode,EmpName,Address,Email,DOB,FatherName,MotherName,ContactNo,Gender,Nationality,Religion,NID,JoiningDate,DeptCode,DesigCode,SecCode,DivCode,EmpTypeCode,CurrentSalary,AccNo,BankName")] tblEmployee tblEmployee)
        {
            if (ModelState.IsValid)
            {
                db.tblEmployees.Add(tblEmployee);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.DeptCode    = new SelectList(db.tblDepartments, "DeptCode", "DepartmentName", tblEmployee.DeptCode);
            ViewBag.DesigCode   = new SelectList(db.tblDesignations, "DesigCode", "Designation", tblEmployee.DesigCode);
            ViewBag.DivCode     = new SelectList(db.tblDivisions, "DivCode", "Division", tblEmployee.DivCode);
            ViewBag.EmpTypeCode = new SelectList(db.tblEmployeeTypes, "EmpTypecode", "EmpType", tblEmployee.EmpTypeCode);
            ViewBag.SecCode     = new SelectList(db.tblSections, "SecCode", "SectionName", tblEmployee.SecCode);
            return(View(tblEmployee));
        }