public ActionResult Create(PurchaseItem purchaseitem) { DateTime CurrentDate = DateTime.Today; var UserID = "Rakib"; var ActionType = "Purchase"; string InvoiceNo = (DateTime.Now.Month.ToString() + DateTime.Now.Day.ToString() + DateTime.Now.Year.ToString() + DateTime.Now.Hour.ToString() + DateTime.Now.Minute.ToString() + DateTime.Now.Second.ToString() + DateTime.Now.Millisecond).ToString(); if (ModelState.IsValid) { //prPurchaseItem var result = db.prPurchaseItem(purchaseitem.ProductCode, purchaseitem.Quantity, purchaseitem.UnitPrice, purchaseitem.ClientPrice, ActionType, purchaseitem.Remarks, CurrentDate, UserID, InvoiceNo); return(Json(result, JsonRequestBehavior.AllowGet)); } return(View(purchaseitem)); }