public ActionResult AddPrdctAndDoc(String productname, String productdesc, String docdtls) { Int32 prdctid = 0; if (productname != null && productdesc != null) { prdctid = prdctmdl.AddProduct(productname, productdesc); if (prdctmdl.error == null) { if (prdctid != 0) { if (Convert.ToString(docdtls) != null) { String msg = prdctmdl.AddDocument(docdtls); if (prdctmdl.error == null) { return Json("Records Inserted successfully. Mail sent to Main Authors."); } } } return Json(prdctmdl.Message); } { return Json(prdctmdl.error); } } return Json("Fileds Empty."); }