Exemple #1
0
        public HttpResponseMessage GetLeaveTypeId()
        {
            var currantYear = DateTime.Now.Year.ToString();
            var formatter   = RequestFormat.JsonFormaterString();

            return(Request.CreateResponse(HttpStatusCode.OK, _LeaveRegisterGateway.GetIdCasCadeDropDown("SELECT Id, Name From tbl_HR_LEAVE_TYPE WHERE Year=" + currantYear + " Order By Id "), formatter));
        }
Exemple #2
0
        public HttpResponseMessage GetAllRolesForEmpUser(long company_id)
        {
            var roles     = roleRepository.GetAllRolesForEmpUser(company_id);
            var formatter = RequestFormat.JsonFormaterString();

            return(Request.CreateResponse(HttpStatusCode.OK, roles, formatter));
        }
Exemple #3
0
        public HttpResponseMessage GetPromotinByChannelId(long channelId)
        {
            var data      = promotionRepository.GetPromotinByChannelId(channelId);
            var formatter = RequestFormat.JsonFormaterString();

            return(Request.CreateResponse(HttpStatusCode.OK, data, formatter));
        }
Exemple #4
0
        public HttpResponseMessage GetSystemQuantityForAccessories(long warehouse_id, long product_id)
        {
            var countries = inventoryAdjustmentRepository.GetSystemQuantityForAccessories(warehouse_id, product_id);
            var formatter = RequestFormat.JsonFormaterString();

            return(Request.CreateResponse(HttpStatusCode.OK, countries, formatter));
        }
        public async Task <HttpResponseMessage> Post([FromBody] LoanAndAdvanceModel mLoanAndAdvanceModel)
        {
            var    formatter = RequestFormat.JsonFormaterString();
            string msg       = "";

            try
            {
                if (mLoanAndAdvanceModel.EmployeeId == 0)
                {
                    return(Request.CreateResponse(HttpStatusCode.OK, new Confirmation {
                        Output = "error", Msg = "Employee Code is Empty"
                    }, formatter));
                }
                else
                {
                    msg = await _loanAndAdvanceGatway.Save(mLoanAndAdvanceModel);

                    return(Request.CreateResponse(HttpStatusCode.OK,
                                                  new Confirmation {
                        Output = "success", Msg = msg
                    }, formatter));
                }
            }
            catch (Exception ex)
            {
                return(Request.CreateResponse(HttpStatusCode.OK, new Confirmation {
                    Output = "error", Msg = ex.ToString()
                }, formatter));
            }
        }
        public HttpResponseMessage GetThirdAndFourthClassEmployeePayslip(int monthId, int year)
        {
            var  formatter = RequestFormat.JsonFormaterString();
            bool m;

            m = _gtPayrollreportGateway.FncSeekRecordNew("VW_HR_REPORT_PAYSLIP_GOV_GLOBAL", " MonthId='" + monthId + "' AND Year='" + year + "'AND Grade between 10 and 20");


            if (m == true)
            {
                try
                {
                    string condition = "";
                    condition = "WHERE  MonthId='" + monthId + "' AND Year='" + year + "'AND Grade between 10 and 20";

                    return(Request.CreateResponse(HttpStatusCode.OK, _gtPayrollreportGateway.PrintReportHr("PaySlipFor3-4EmployeeReportFile.rpt", "VW_HR_REPORT_PAYSLIP_GOV_GLOBAL", condition, "VW_HR_REPORT_PAYSLIP_GOV_GLOBAL", "Third and Fourth Class Employee Payslip", "", "V"), formatter));
                }
                catch (Exception ex)
                {
                    throw;
                }
            }
            else
            {
                return(Request.CreateResponse(HttpStatusCode.OK, new Confirmation {
                    Output = "error", Msg = " employee's salary are not created.!!"
                }, formatter));
            }
        }
        public HttpResponseMessage GetBonus(int employeeId, int year, int bonusFor)
        {
            var  formatter = RequestFormat.JsonFormaterString();
            bool m;

            m = _gtPayrollreportGateway.FncSeekRecordNew("VW_HR_BONUS_FOR_OFFICER", " EmpId='" + employeeId + "' AND AttYear='" + year + "' AND BonusFor=" + bonusFor + "");


            if (m == true)
            {
                try
                {
                    string condition = "";
                    condition = "WHERE  EmpId='" + employeeId + "' AND AttYear='" + year + "' AND BonusFor=" + bonusFor + "";

                    return(Request.CreateResponse(HttpStatusCode.OK, _gtPayrollreportGateway.PrintReportHr("PaySlipBonusOfficer.rpt", "VW_HR_BONUS_FOR_OFFICER", condition, "VW_HR_BONUS_FOR_OFFICER", "Bonus Report", "", "V"), formatter));
                }
                catch (Exception ex)
                {
                    throw;
                }
            }
            else
            {
                return(Request.CreateResponse(HttpStatusCode.OK, new Confirmation {
                    Output = "error", Msg = " employee's salary are not created.!!"
                }, formatter));
            }
        }
Exemple #8
0
        public HttpResponseMessage GetReceiveByIdEdit(long receive_id)
        {
            var allPayment = receiveRepository.GetReceiveById(receive_id);
            var formatter  = RequestFormat.JsonFormaterString();

            return(Request.CreateResponse(HttpStatusCode.OK, allPayment, formatter));
        }
Exemple #9
0
        public HttpResponseMessage GetInvoiceNumber(long party_id)
        {
            var invoiceNumber = receiveRepository.GetInvoiceNumber(party_id);
            var formatter     = RequestFormat.JsonFormaterString();

            return(Request.CreateResponse(HttpStatusCode.OK, invoiceNumber, formatter));
        }
Exemple #10
0
 public HttpResponseMessage UpdateStatus(long receive_id, long user_id)
 {
     try
     {
         var allPayment = receiveRepository.UpdateStatus(receive_id, user_id);
         if (allPayment == true)
         {
             var formatter = RequestFormat.JsonFormaterString();
             return(Request.CreateResponse(HttpStatusCode.OK, new Confirmation {
                 output = "success", msg = "Payment Recieved Successfully"
             }, formatter));
         }
         else
         {
             var formatter = RequestFormat.JsonFormaterString();
             return(Request.CreateResponse(HttpStatusCode.OK, new Confirmation {
                 output = "warning", msg = "Please Verify First"
             }, formatter));
         }
     }
     catch (Exception ex)
     {
         var formatter = RequestFormat.JsonFormaterString();
         return(Request.CreateResponse(HttpStatusCode.OK, new Confirmation {
             output = "error", msg = ex.ToString()
         }, formatter));
     }
 }
Exemple #11
0
        public HttpResponseMessage GetClousingBalance(long party_id)
        {
            var closingbalance = receiveRepository.GetClousingBalance(party_id);
            var formatter      = RequestFormat.JsonFormaterString();

            return(Request.CreateResponse(HttpStatusCode.OK, closingbalance, formatter));
        }
Exemple #12
0
        public HttpResponseMessage GetAllReceives()
        {
            var allReceives = receiveRepository.GetAllReceives();
            var formatter   = RequestFormat.JsonFormaterString();

            return(Request.CreateResponse(HttpStatusCode.OK, allReceives, formatter));
        }
Exemple #13
0
        public HttpResponseMessage GetRegionwiseAreaForDropdown(long region_id)
        {
            var area      = _areaRepository.GetRegionwiseAreaForDropdown(region_id);
            var formatter = RequestFormat.JsonFormaterString();

            return(Request.CreateResponse(HttpStatusCode.OK, area, formatter));
        }
Exemple #14
0
        public HttpResponseMessage GetLeaveCulculation(string code, int leaveType)
        {
            var formatter = RequestFormat.JsonFormaterString();
            var restLeave = _LeaveRegisterGateway.LeaveCalculation(code, leaveType);

            return(Request.CreateResponse(HttpStatusCode.OK, restLeave, formatter));
        }
Exemple #15
0
        public HttpResponseMessage Post([FromBody] Models.mail_receiver_setting mail_receiver_setting)
        {
            try
            {
                if (string.IsNullOrEmpty(mail_receiver_setting.process_code_id.ToString()))
                {
                    var formatter = RequestFormat.JsonFormaterString();
                    return(Request.CreateResponse(HttpStatusCode.OK, new Confirmation {
                        output = "error", msg = "Process Code is Empty"
                    }, formatter));
                }
                if (string.IsNullOrEmpty(mail_receiver_setting.receiver_name))
                {
                    var formatter = RequestFormat.JsonFormaterString();
                    return(Request.CreateResponse(HttpStatusCode.OK, new Confirmation {
                        output = "error", msg = "Receiver Name is Empty"
                    }, formatter));
                }
                if (string.IsNullOrEmpty(mail_receiver_setting.receiver_email))
                {
                    var formatter = RequestFormat.JsonFormaterString();
                    return(Request.CreateResponse(HttpStatusCode.OK, new Confirmation {
                        output = "error", msg = "Receiver Email is Empty"
                    }, formatter));
                }
                //if (mailReceiverSettingRepository.CheckDuplicateRecieverEmail(mail_receiver_setting.receiver_email))
                //{
                //    var formatter = RequestFormat.JsonFormaterString();
                //    return Request.CreateResponse(HttpStatusCode.OK, new Confirmation { output = "error", msg = "Email Already Exists" }, formatter);
                //}
                else
                {
                    Models.mail_receiver_setting insertMailReceiverSetting = new Models.mail_receiver_setting
                    {
                        process_code_id = mail_receiver_setting.process_code_id,
                        receiver_name   = mail_receiver_setting.receiver_name,
                        receiver_email  = mail_receiver_setting.receiver_email,
                        is_active       = true,
                        is_deleted      = false,
                        created_by      = mail_receiver_setting.created_by,
                        created_date    = DateTime.Now,
                        updated_by      = mail_receiver_setting.updated_by,
                        updated_date    = DateTime.Now
                    };
                    bool save = mailReceiverSettingRepository.InsertMailReceiverSetting(insertMailReceiverSetting);

                    var formatter = RequestFormat.JsonFormaterString();
                    return(Request.CreateResponse(HttpStatusCode.OK, new Confirmation {
                        output = "success", msg = "Save successfully"
                    }, formatter));
                }
            }
            catch (Exception ex)
            {
                var formatter = RequestFormat.JsonFormaterString();
                return(Request.CreateResponse(HttpStatusCode.OK, new Confirmation {
                    output = "error", msg = ex.ToString()
                }, formatter));
            }
        }
Exemple #16
0
        public HttpResponseMessage GetMoneyReceiptReport(long receive_id)
        {
            var moneyReceipt = receiveRepository.GetMoneyReceiptReport(receive_id);
            var formatter    = RequestFormat.JsonFormaterString();

            return(Request.CreateResponse(HttpStatusCode.OK, moneyReceipt, formatter));
        }
Exemple #17
0
        public HttpResponseMessage GetAllCurrency()
        {
            var data      = currencyRepository.GetAllCurrency();
            var formatter = RequestFormat.JsonFormaterString();

            return(Request.CreateResponse(HttpStatusCode.OK, data, formatter));
        }
Exemple #18
0
        public HttpResponseMessage ProcessPaymentRequiest(long payment_req_id)
        {
            var allPayment = receiveRepository.ProcessPaymentRequiest(payment_req_id);
            var formatter  = RequestFormat.JsonFormaterString();

            return(Request.CreateResponse(HttpStatusCode.OK, allPayment, formatter));
        }
        public HttpResponseMessage GetBankCash(int monthId, int year)
        {
            var  formatter = RequestFormat.JsonFormaterString();
            bool m;

            m = _gtPayrollreportGateway.FncSeekRecordNew("VW_HR_PAYROLL_CASHBANK", " MonthId='" + monthId + "' AND Year='" + year + "'");


            if (m == true)
            {
                try
                {
                    string condition = "";
                    condition = "WHERE  MonthId='" + monthId + "' AND Year='" + year + "'";

                    return(Request.CreateResponse(HttpStatusCode.OK, _gtPayrollreportGateway.PrintReportHr("PaySlipCashBankReport.rpt", "VW_HR_PAYROLL_CASHBANK", condition, "VW_HR_PAYROLL_CASHBANK", "Cash And Bank", "", "V"), formatter));
                }
                catch (Exception ex)
                {
                    throw;
                }
            }
            else
            {
                return(Request.CreateResponse(HttpStatusCode.OK, new Confirmation {
                    Output = "error", Msg = " employee's salary are not created.!!"
                }, formatter));
            }
        }
Exemple #20
0
        public HttpResponseMessage GetPaymentHistory(string from_date, string to_date)
        {
            var allPaymentHistory = receiveRepository.PaymentHistory(from_date, to_date);
            var formatter         = RequestFormat.JsonFormaterString();

            return(Request.CreateResponse(HttpStatusCode.OK, allPaymentHistory, formatter));
        }
        public HttpResponseMessage GetBonusFor10To20GredeEmployee(int year, int bonusFor)
        {
            var  formatter = RequestFormat.JsonFormaterString();
            bool m;

            m = _gtPayrollreportGateway.FncSeekRecordNew("VW_HR_BONUS_FOR_OFFICER", " AttYear=" + year + " and BonusFor=" + bonusFor + "  AND Grade between 10 and 20");


            if (m == true)
            {
                try
                {
                    string condition = "";
                    condition = " where AttYear=" + year + " and BonusFor=" + bonusFor + "  AND Grade between 10 and 20";

                    return(Request.CreateResponse(HttpStatusCode.OK, _gtPayrollreportGateway.PrintReportHr("PaySlipBonusFor10-20EmployeeReportFile.rpt", "VW_HR_BONUS_FOR_OFFICER", condition, "VW_HR_BONUS_FOR_OFFICER", "Bonus Report", "", "V"), formatter));
                }
                catch (Exception ex)
                {
                    throw;
                }
            }
            else
            {
                return(Request.CreateResponse(HttpStatusCode.OK, new Confirmation {
                    Output = "error", Msg = " employee's salary are not created.!!"
                }, formatter));
            }
        }
Exemple #22
0
        public HttpResponseMessage ProductLiftingAndPaymentSummery(string from_date, string to_date, long party_id)
        {
            var allProductLiftingAndPaymentSummery = receiveRepository.ProductLiftingAndPaymentSummery(from_date, to_date, party_id);
            var formatter = RequestFormat.JsonFormaterString();

            return(Request.CreateResponse(HttpStatusCode.OK, allProductLiftingAndPaymentSummery, formatter));
        }
Exemple #23
0
        public HttpResponseMessage GetInventoryAdjustmentListForApprove()
        {
            var countries = inventoryAdjustmentRepository.GetInventoryAdjustmentListForApprove();
            var formatter = RequestFormat.JsonFormaterString();

            return(Request.CreateResponse(HttpStatusCode.OK, countries, formatter));
        }
Exemple #24
0
        public HttpResponseMessage GetAllPaymentReceivedList(DateTime fromDate, DateTime toDate, long partyId)
        {
            var specificReceivedPaymentByDateFilter = receiveRepository.GetAllPaymentReceivedList(fromDate, toDate, partyId);
            var formatter = RequestFormat.JsonFormaterString();

            return(Request.CreateResponse(HttpStatusCode.OK, specificReceivedPaymentByDateFilter, formatter));
        }
Exemple #25
0
        public HttpResponseMessage GetAllEmployeRoles(long companyId)
        {
            var roles     = roleRepository.GetEmployeeRoleTypeBySource(companyId);
            var formatter = RequestFormat.JsonFormaterString();

            return(Request.CreateResponse(HttpStatusCode.OK, roles, formatter));
        }
Exemple #26
0
        public HttpResponseMessage GetReceiveList()
        {
            var PaymentList = receiveRepository.GetReceiveList();
            var formatter   = RequestFormat.JsonFormaterString();

            return(Request.CreateResponse(HttpStatusCode.OK, PaymentList, formatter));
        }
Exemple #27
0
        public HttpResponseMessage GetAllActivePromotions()
        {
            var data      = promotionRepository.GetAllActivePromotions();
            var formatter = RequestFormat.JsonFormaterString();

            return(Request.CreateResponse(HttpStatusCode.OK, data, formatter));
        }
Exemple #28
0
        public HttpResponseMessage GetAllActiveMailReceiverSettings()
        {
            var data      = mailReceiverSettingRepository.GetAllActiveMailReceiverSettings();
            var formatter = RequestFormat.JsonFormaterString();

            return(Request.CreateResponse(HttpStatusCode.OK, data, formatter));
        }
Exemple #29
0
        public HttpResponseMessage GetPromotionInformation(long product_id, long promotion_master_id, int quantity)
        {
            var data      = promotionRepository.GetPromotionInformation(product_id, promotion_master_id, quantity);
            var formatter = RequestFormat.JsonFormaterString();

            return(Request.CreateResponse(HttpStatusCode.OK, data, formatter));
        }
Exemple #30
0
        public HttpResponseMessage Put([FromBody] Models.product_category product_category)
        {
            try
            {
                Models.product_category updateProductCategory = new Models.product_category
                {
                    product_category_id   = product_category.product_category_id,
                    product_category_name = product_category.product_category_name,
                    product_category_code = product_category.product_category_code
                };

                productCategoryRepository.EditProductCategory(updateProductCategory);


                var formatter = RequestFormat.JsonFormaterString();
                return(Request.CreateResponse(HttpStatusCode.OK, new Confirmation {
                    output = "success", msg = "Product Category update successfully"
                }, formatter));
            }
            catch (Exception ex)
            {
                var formatter = RequestFormat.JsonFormaterString();
                return(Request.CreateResponse(HttpStatusCode.OK, new Confirmation {
                    output = "error", msg = ex.ToString()
                }, formatter));
            }
        }