public ActionResult DearchDockData(string wareHouse, string from, string asn, int range) { try { GOMS_ASN_H_BLL gBLL = new GOMS_ASN_H_BLL(); var result = gBLL.GetDockData(wareHouse, from, asn, range); return(Json(new RequestResult(result))); } catch (Exception ex) { LogHelper.WriteLog("DearchDockData", ex); return(Json(new RequestResult(false, ex.Message))); } }
public ActionResult SaveDockData(GOMS_ASN_H data) { //Date check if (data.DOCK_DATE != null && data.CREATE_DATE != null) { if (data.DOCK_DATE <= data.CREATE_DATE) { return(Json(new RequestResult(false, "Dock Date should larger than create date"))); } } if (data.DOCK_DATE != null && data.SHIPMENT_DATE != null) { if (data.DOCK_DATE <= data.SHIPMENT_DATE) { return(Json(new RequestResult(false, "Dock Date should larger than Shipment date"))); } } if (data.SHIPMENT_DATE != null && data.EST_DLVY_DATE != null) { if (data.SHIPMENT_DATE >= data.EST_DLVY_DATE) { return(Json(new RequestResult(false, "Shipment Date should less than EST DLVY date"))); } } try { string appUser = Session[CHubConstValues.SessionUser].ToString(); GOMS_ASN_H_BLL gBLL = new GOMS_ASN_H_BLL(); data.DOCK_DATE_BY = appUser; gBLL.SaveDockData(data); return(Json(new RequestResult(true))); } catch (Exception ex) { LogHelper.WriteLog("DearchDockData", ex); return(Json(new RequestResult(false, ex.Message))); } }