public string SaveTaxDetails(string Tax, int UserID) { try { if (!Utility.CommonUtility.CheckUserAuthenticated()) return "fail"; TaxMasterBLL ObjTaxMasterBLL = (TaxMasterBLL)Newtonsoft.Json.JsonConvert.DeserializeObject(Tax, typeof(TaxMasterBLL)); TaxMasterBLL TaxMasterBLL = new TaxMasterBLL(ObjTaxMasterBLL.TaxID); TaxMasterBLL.Name = ObjTaxMasterBLL.Name; TaxMasterBLL.Percentage = ObjTaxMasterBLL.Percentage; if (ObjTaxMasterBLL.TaxID == 0) { TaxMasterBLL.CreatedOn = DateTime.Now; TaxMasterBLL.CreatedBy = UserID; } TaxMasterBLL.UpdatedOn = DateTime.Now; TaxMasterBLL.UpdateBy = UserID; TaxMasterBLL.Save(); return Convert.ToString(TaxMasterBLL.TaxID); } catch (Exception ex) { //ValuePad.Utility.CommonUtility.SendErrorMail(ex); return "fail"; } }