Exemplo n.º 1
0
        public string UpdateStatus(int Id, bool Mode)
        {
            object result    = null;
            string strReturn = string.Empty;

            try
            {
                obj = BL_tblPropertyTaxMap.GetSingleRecordById(Id);
                if (Mode == true)
                {
                    obj.cStatus = "A";
                }
                else
                {
                    obj.cStatus = "I";
                }
                int i = BL_tblPropertyTaxMap.UpdateStatus(obj);
                if (i == 1)
                {
                    result = new { st = 1, msg = "Updated successfully." };
                }
                else if (i == 2)
                {
                    result = new { st = 0, msg = "Tax already exixts for selected Rate Plan and Stay Validity" };
                }
                else
                {
                    result = new { st = 0, msg = "Kindly try after some time." };
                }
            }
            catch (Exception)
            {
                result = new { st = 0, msg = "Kindly try after some time." };
            }
            strReturn = OneFineRateAppUtil.clsUtils.ConvertToJson(result);
            return(strReturn);
        }