var LcDD = _repository.Search(searchId,refNo).ToList();
var approvalStatus = _repository.Search(Code,version).ToList();
var LcDDAdvice = new { lcDDInfo = LcDD, Status = approvalStatus };
int num = 1;
num.ToString("D4"); //- short form format specifier
// result: '0001'
JavaScriptSerializer javaScriptSerializer = new JavaScriptSerializer();
javaScriptSerializer.MaxJsonLength = Int32.MaxValue;
///or
var result = Json(JsonConvert.SerializeObject(oInvoice), JsonRequestBehavior.AllowGet);
result.MaxJsonLength = Int32.MaxValue;