public Result SaveInjection(Injection Inj) { Result result = new Result(); if (!Inj.IsValid()) { result.StatusCode = Globals.FAILURE_STATUS_CODE; result.StatusDesc = Inj.StatusDesc; return(result); } DataTable dt = dh.ExecuteDataSet("SaveInjectionDetails", new string[] { Inj.CompanyCode, Inj.InjectionNumber, Inj.InjectorName, Inj.Amount, Inj.InjectionDate, Inj.RepaymentAmount, Inj.RepaymentDate, Inj.PhoneNo, Inj.Email, Inj.InjectionDesc, Inj.InjectionType, Inj.ModifiedBy }).Tables[0]; if (dt.Rows.Count <= 0) { result.StatusCode = Globals.FAILURE_STATUS_CODE; result.StatusDesc = "FAILED: INJECTION NOT SAVED"; return(result); } result.StatusCode = Globals.SUCCESS_STATUS_CODE; result.StatusDesc = Globals.SUCCESS_STATUS_TEXT; result.LoanID = dt.Rows[0][0].ToString(); return(result); }