//public HttpResponseMessage UpdateIncomeAdjustmentVol(HttpRequestMessage request, int ID, string MISCODE, string ACCTCODE, int PERIOD, int YEAR, string ACCOUNTNUMBER, string PRODUCTCODE, string CATEGORY, string CURRENCY, string CUSTNAME, string CAPTION, string ACCOUNTNUMBER1)
        public HttpResponseMessage UpdateIncomeAdjustmentVol(HttpRequestMessage request, [FromBody] UpdateIncomeAdjustmentVolumeSearchModel updatevolumemodel)
        {
            return(GetHttpResponse(request, () =>
            {
                //IncomeAdjustmentVolumeSearchMtd obj = new IncomeAdjustmentVolumeSearchMtd();
                //obj.UpdateIncomeAdjustmentVolumeSearch(updatevolumemodel);

                OtherInfo latestsetup = new OtherInfo();

                int currentyear = latestsetup.GetLatestIncomeSetUp().Year;
                int currentperiod = latestsetup.GetLatestIncomeSetUp().CurrentPeriod;

                if (updatevolumemodel.YEAR == currentyear && updatevolumemodel.PERIOD == currentperiod)
                {
                    IncomeAdjustmentVolumeSearchMtd obj = new IncomeAdjustmentVolumeSearchMtd();
                    obj.UpdateIncomeAdjustmentVolumeSearch(updatevolumemodel);
                }

                return request.CreateResponse(HttpStatusCode.OK);
            }));
        }
Example #2
0
        public HttpResponseMessage DeleteIncomeAdjustmentCommFeesSearch(HttpRequestMessage request, [FromBody] int Id, [FromBody] IncomeAdjustmentCommFeesSearchModel updatecfmodel)
        {
            return(GetHttpResponse(request, () =>
            {
                //IncomeAdjustmentVolumeSearchMtd obj = new IncomeAdjustmentVolumeSearchMtd();
                //obj.DeleteIncomeAdjustmentVolumeSearch(Id);

                OtherInfo latestsetup = new OtherInfo();

                int currentyear = latestsetup.GetLatestIncomeSetUp().Year;
                int currentperiod = latestsetup.GetLatestIncomeSetUp().CurrentPeriod;

                if (updatecfmodel.Year == currentyear && updatecfmodel.Period == currentperiod)
                {
                    IncomeAdjustmentCommFeesSearchMtd obj = new IncomeAdjustmentCommFeesSearchMtd();
                    if (updatecfmodel.Year == DateTime.Now.Year)
                    {
                        obj.DeleteIncomeAdjustmentCommFeesSearch(Id);
                    }
                }

                return request.CreateResponse(HttpStatusCode.OK);
            }));
        }