コード例 #1
0
        public ActionResult SubmitITLiablity(List <ITModel> Tabledata, Int64 EmployeeID, Int64 FinancialYear)
        {
            try

            {
                DataTable TableData = JsonConvert.DeserializeObject <DataTable>(JsonConvert.SerializeObject(Tabledata));
                MTSHRDataLayer.ITDeclaration data = new MTSHRDataLayer.ITDeclaration();
                foreach (DataRow rowval in TableData.Rows)
                {
                    if (Convert.ToInt64(rowval["FLAG"]) == 2)
                    {
                        var   month       = rowval["MONTH_NAME"].ToString();
                        Int64 monthno     = this.getMonth(month);
                        var   checkinsert = data.SubmitITLiablity(EmployeeID, FinancialYear, monthno, Convert.ToDecimal(rowval["DEDUCTED_AMOUNT"]));
                    }
                }

                return(Json(new { result = true }));
            }

            catch (Exception ex)
            {
                throw ex;
            }
        }
コード例 #2
0
        public ActionResult getITLiablity(Int64 EmployeeID, Int64 FinancialYear)
        {
            MTSHRDataLayer.ITDeclaration data = new MTSHRDataLayer.ITDeclaration();
            DataSet dst = new DataSet();

            dst = data.getITLiablity(EmployeeID, FinancialYear);
            return(Json(new { success = true, result = JsonConvert.SerializeObject(dst?.Tables[0]), result1 = JsonConvert.SerializeObject(dst?.Tables[1]) }, JsonRequestBehavior.AllowGet));
        }
コード例 #3
0
        public ActionResult getAssignedEmployees()
        {
            MTSHRDataLayer.ITDeclaration data = new MTSHRDataLayer.ITDeclaration();
            DataTable result = new DataTable();

            result = data.getAssignedEmployees();
            return(Json(new { success = true, result = JsonConvert.SerializeObject(result) }, JsonRequestBehavior.AllowGet));
        }
コード例 #4
0
        public ActionResult ITDeclarationofEmployee(String Employee_ID, Int64 year, bool IT_Declaration, Decimal payable_tax)
        {
            MTSHRDataLayer.ITDeclaration data = new MTSHRDataLayer.ITDeclaration();
            var   table  = data.ITDeclarationofEmployee(Convert.ToInt64(Employee_ID), Convert.ToInt64(year), IT_Declaration, payable_tax);
            Int64 result = Convert.ToInt64(table) > 0 ? 1 : 0;

            return(Json(new { success = true, result = result }, JsonRequestBehavior.AllowGet));
        }
コード例 #5
0
        public ActionResult getFinancialYearDetails(string year)
        {
            MTSHRDataLayer.ITDeclaration data = new MTSHRDataLayer.ITDeclaration();
            Int64 sDate = Convert.ToInt64(year.Split('-')[0]);
            Int64 eDate = Convert.ToInt64(year.Split('-')[1]);
            var   table = data.getFinancialYearDetails(sDate, eDate);

            return(Json(new { success = true, result1 = JsonConvert.SerializeObject(table) }, JsonRequestBehavior.AllowGet));
        }
コード例 #6
0
        public ActionResult getSummaryTabDetails(Int64 year = 0)
        {
            var EmpID = Session["UserID"].ToString();

            MTSHRDataLayer.ITDeclaration data = new MTSHRDataLayer.ITDeclaration();
            var tableDetails = data.getSummaryTabDetails(Convert.ToInt64(EmpID), year);

            return(Json(new { success = true, result1 = JsonConvert.SerializeObject(tableDetails.Tables[0]) }, JsonRequestBehavior.AllowGet));
        }
コード例 #7
0
        public ActionResult getOtherSourceIncomeDetails(Int64 year = 0, Int64 Employee_ID = 0)
        {
            var EmpID = Session["UserID"].ToString();

            if (Employee_ID == 0)
            {
                Employee_ID = Convert.ToInt64(EmpID);
            }
            MTSHRDataLayer.ITDeclaration data = new MTSHRDataLayer.ITDeclaration();
            DataTable tableDetails            = data.getOtherSourceIncomeDetails(Convert.ToInt64(Employee_ID), year);

            return(Json(new { success = true, result1 = JsonConvert.SerializeObject(tableDetails) }, JsonRequestBehavior.AllowGet));
        }
コード例 #8
0
        public ActionResult UploadImagefiles(HttpPostedFileBase qqfile, string employeecode, string fileid, string description)
        {
            string currentMonth = "";
            string filename     = qqfile.FileName;
            string extension    = Path.GetExtension(filename);
            Int64  result       = 0;

            byte[] bytes;
            using (var binaryReader = new BinaryReader(qqfile.InputStream))
            {
                bytes = binaryReader.ReadBytes(Request.Files[0].ContentLength);
            }
            Stream excelStream = qqfile.InputStream;
            string path        = @"D:\HRFiles";

            path = System.IO.Path.Combine(path, employeecode);
            var    EmpID           = Session["UserID"].ToString();
            string fileName        = fileid + "-" + description + "" + extension;
            string fileNamewithall = fileid + "-" + description + ".*";

            //  MemoryStream ms = (MemoryStream)excelStream;
            // = ms.ToArray();
            if (!Directory.Exists(path))
            {
                Directory.CreateDirectory(path);
            }


            checkandDeleteExistingfiles(path, fileNamewithall);
            using (FileStream fs = new FileStream(Path.Combine(path, fileName), FileMode.CreateNew, FileAccess.Write))
            {
                fs.Write(bytes, 0, (int)bytes.Length);
                //fs.Close();
            }
            MTSHRDataLayer.ITDeclaration data = new MTSHRDataLayer.ITDeclaration();
            try
            {
            }
            catch (Exception e)
            {
                BaseExceptionHandler.HandleException(ref e);
            }
            return(Json(new { result = result }));
        }
コード例 #9
0
        public ActionResult saveITFormDetails(Int64 emp_IT_id = 0, string tempSection = null, string tempSubSectionList = null, string tempsubAmtList = null, string tempActualAmtList = null, decimal totalDeclaredAmt = 0, decimal totalActualAmt = 0, Int64 year = 0, Int64 Employee_ID = 0)
        {
            var EmpID = Session["UserID"].ToString();

            if (Employee_ID == 0)
            {
                Employee_ID = Convert.ToInt64(EmpID);
            }
            Int64 result = 0;

            MTSHRDataLayer.ITDeclaration data = new MTSHRDataLayer.ITDeclaration();

            try
            {
                string[] SubSectionList = tempSubSectionList.Split(',');
                string[] SubmittedAmt   = tempsubAmtList.Split(',');
                string[] ActualAmt      = tempActualAmtList.Split(',');

                if (SubSectionList != null && SubSectionList.Length > 0)
                {
                    for (int int_i = 0; int_i <= SubSectionList.Length; int_i++)
                    {
                        if (int_i == SubSectionList.Length)
                        {
                            result = data.saveITFormDetails(emp_IT_id, tempSection, "", Convert.ToDecimal(totalDeclaredAmt), null, null, null, Convert.ToDecimal(totalActualAmt), null, null, year, Employee_ID);
                        }
                        else
                        {
                            result = data.saveITFormDetails(emp_IT_id, tempSection, (SubSectionList[int_i]), Convert.ToDecimal(SubmittedAmt[int_i]), null, null, null, Convert.ToDecimal(ActualAmt[int_i]), null, null, year, Employee_ID);
                        }
                    }
                }
                if (result > 0)
                {
                    result = 1;
                }
            }
            catch (Exception e)
            {
                BaseExceptionHandler.HandleException(ref e);
            }
            return(Json(new { result = result }));
        }
コード例 #10
0
        public ActionResult FinalSubmitITDeclaration(Int64 emp_IT_ID = 0, bool DirectITDeclaration = false)
        {
            Int64 result = 0;
            var   EmpID  = Session["UserID"].ToString();

            MTSHRDataLayer.ITDeclaration data = new MTSHRDataLayer.ITDeclaration();
            try
            {
                result = data.FinalSubmitITDeclaration(emp_IT_ID, Convert.ToBoolean(DirectITDeclaration), DateTime.Now, EmpID);
                if (result > 0)
                {
                    result = 1;
                }
            }
            catch (Exception e)
            {
                BaseExceptionHandler.HandleException(ref e);
            }
            return(Json(new { result = result }));
        }
コード例 #11
0
        public ActionResult AddHomeRentDetails(Int64 Id = 0, string year = null, string fromdate = null, string todate = null, string PAN = null, string address = null, string amount = null, string Name = null, Int64 Employee_ID = 0, Int64 HRA_ActualAmt = 0)
        {
            Int64 result = 0;
            var   EmpID  = Session["UserID"].ToString();

            if (Employee_ID == 0)
            {
                Employee_ID = Convert.ToInt64(EmpID);
            }
            MTSHRDataLayer.ITDeclaration data = new MTSHRDataLayer.ITDeclaration();
            try
            {
                result = data.AddHomeRentDetails(Id, Employee_ID, Convert.ToInt64(year), Convert.ToDateTime(fromdate), Convert.ToDateTime(todate), Convert.ToDecimal(amount), PAN, address, Name, Convert.ToDecimal(HRA_ActualAmt));
                if (result > 0)
                {
                    result = 1;
                }
            }
            catch (Exception e)
            {
                BaseExceptionHandler.HandleException(ref e);
            }
            return(Json(new { result = result }));
        }
コード例 #12
0
        public ActionResult addOtherSourceIncomeDetails(Int64 Id = 0, Int64 financialYear = 0, decimal incomeOtherSource = 0, decimal savingsInterst = 0, decimal fixedInterest = 0, Int64 Employee_ID = 0)
        {
            Int64 result = 0;
            var   EmpID  = Session["UserID"].ToString();

            if (Employee_ID == 0)
            {
                Employee_ID = Convert.ToInt64(EmpID);
            }
            MTSHRDataLayer.ITDeclaration data = new MTSHRDataLayer.ITDeclaration();
            try
            {
                result = data.addOtherSourceIncomeDetails(Id, Employee_ID, Convert.ToInt64(financialYear), null, Convert.ToDecimal(incomeOtherSource), Convert.ToDecimal(savingsInterst), Convert.ToDecimal(fixedInterest));
                if (result > 0)
                {
                    result = 1;
                }
            }
            catch (Exception e)
            {
                BaseExceptionHandler.HandleException(ref e);
            }
            return(Json(new { result = result }));
        }
コード例 #13
0
        public ActionResult AddHouseLoanDetails(Int64 Id = 0, Decimal principalPaid = 0, Decimal interestPaid = 0, string nameLender = null, string lenderPAN = null, string LoanFinancialYear = null, Int64 Employee_ID = 0)
        {
            Int64 result = 0;
            var   EmpID  = Session["UserID"].ToString();

            if (Employee_ID == 0)
            {
                Employee_ID = Convert.ToInt64(EmpID);
            }
            MTSHRDataLayer.ITDeclaration data = new MTSHRDataLayer.ITDeclaration();
            try
            {
                result = data.AddHouseLoanDetails(Id, Employee_ID, Convert.ToInt64(LoanFinancialYear), principalPaid, interestPaid, nameLender, lenderPAN);
                if (result > 0)
                {
                    result = 1;
                }
            }
            catch (Exception e)
            {
                BaseExceptionHandler.HandleException(ref e);
            }
            return(Json(new { result = result }));
        }