/// <summary> /// Insert a doctor visit data. Doctor details, Products details, chemists details and RCPA details. /// if source of entry is WEB we do retruns the doctor visit JSON(Doctor details, product details, chemist details, RCPA Details). /// if source of entry is MOBILE we do returns the empty JSON result. /// </summary> /// <param name="dcrVisitCode"></param> /// <param name="dcrActualDate"></param> /// <param name="doctor"></param> /// <param name="products"></param> /// <param name="chemists"></param> /// <param name="rcpa"></param> /// <param name="rcpaFlag"></param> /// <param name="prodBringType"></param> /// <param name="sourceOfEntry"></param> /// <returns></returns> public JsonResult InsertDCRDoctorVisitData(string dcrVisitCode, string dcrActualDate, string doctor, string products, string chemists, string rcpa, string rcpaFlag, string prodBringType, string sourceOfEntry) { string regionCode = _objcurrentInfo.GetRegionCode(); object result = _objSPData.InsertDCRDoctorVisitData(dcrVisitCode, dcrActualDate, doctor, products, chemists, rcpa, rcpaFlag, regionCode, prodBringType); if (result.GetType() == typeof(string)) { return(Json("Error:" + result)); } else { if (sourceOfEntry == "WEB") { DataSet dsCPDoctors = new DataSet(); return(GetDoctorVisitJSON((DataSet)result, dsCPDoctors, dcrActualDate)); } else { JsonResult json = new JsonResult(); return(json); } } }