//While click on Supply status icon, it will open and create a new order entry protected void NewRecordInquiry() { JMMPrescriptionOrderBL objJMPrescriptionOrderBL = null; long?JMPrescriptionOrderID = KPIHlp.CVI64(hdnJMPrescriptionOrderID.Value); try { objJMPrescriptionOrderBL = new JMMPrescriptionOrderBL(); if (JMPrescriptionOrderID.HasValue && JMPrescriptionOrderID != long.MinValue) { JMMPrescriptionOrder objJMPrescriptionOrder = objJMPrescriptionOrderBL.Select(JMPrescriptionOrderID.Value); if (objJMPrescriptionOrder != null) { hdnBookingID.Value = objJMPrescriptionOrder.JMBookingID.HasValue ? objJMPrescriptionOrder.JMBookingID.Value.ToString() : null; hdnJMMedPrescriptionID.Value = objJMPrescriptionOrder.JMMedPrescriptionID.HasValue ? objJMPrescriptionOrder.JMMedPrescriptionID.Value.ToString() : null; hdnJMPrescriptionOrderID.Value = objJMPrescriptionOrder.JMPrescriptionOrderID.HasValue ? objJMPrescriptionOrder.JMPrescriptionOrderID.Value.ToString() : null; hdnOrderNo.Value = objJMPrescriptionOrder.OrderedNo.HasValue ? objJMPrescriptionOrder.OrderedNo.Value.ToString() : null; hdnJurisId.Value = objJMPrescriptionOrder.JurisID.HasValue ? objJMPrescriptionOrder.JurisID.Value.ToString() : null; hdnOrderNo.Value = objJMPrescriptionOrder.OrderedNo.HasValue ? objJMPrescriptionOrder.OrderedNo.Value.ToString() : null; hdnOrderAction.Value = objJMPrescriptionOrder.OrderAction; hdnQuantity.Value = objJMPrescriptionOrder.QtyBalance.HasValue ? objJMPrescriptionOrder.QtyBalance.Value.ToString() : string.Empty; ClearData(); } } } catch (Exception) { throw; } }
private bool Save() { JMMPrescriptionOrder objJMPrescriptionOrder = null; JMMPreOrderHist objJMPreOrderHist = null; JMMPrescriptionOrderBL objJMPrescriptionOrderBL = null; JMMPreOrderHistBL objJMPreOrderHistBL = null; try { if (KPIHlp.CVI64(hdnJMPreOrderHistID.Value) == long.MinValue) { objJMPrescriptionOrder = NewReadScr(); objJMPrescriptionOrderBL = new JMMPrescriptionOrderBL(); KPITrace.Debug(TraceWeight.Five, "Calling Manage for Prescription Order Entry"); WrtActivityLog(long.MinValue, " Managing Prescription Order Entry Dtls.", hdnMode.Value); objJMPrescriptionOrderBL.Manage(ref objJMPrescriptionOrder); hdnJMPrescriptionOrderID.Value = objJMPrescriptionOrder.JMPrescriptionOrderID.HasValue ? objJMPrescriptionOrder.JMPrescriptionOrderID.Value.ToString() : null; NewRecordInquiry(); } else { objJMPreOrderHistBL = new JMMPreOrderHistBL(); objJMPreOrderHist = OldReadScr(); objJMPreOrderHistBL.UpdateHistory(objJMPreOrderHist); ExistingRecordInquiry(); } AutoUpdateParent(); ShowMsg(MsgType.Success, FrwkMsg.UPD_SUCCESS); } catch (Exception objErr) { ShowMsg(MsgType.Error, FrwkMsg.PAGE_ERR, objErr); } return(true); }