public DataSet IQTouchLaboratoryGetArvMutationDetails(BIQTouchLabFields objLabFields) { lock (this) { ClsObject labFieldsManager = new ClsObject(); ClsUtility.Init_Hashtable(); ClsUtility.AddParameters("@Flag", SqlDbType.VarChar, objLabFields.Flag.ToString()); ClsUtility.AddParameters("@LabOrderID", SqlDbType.Int, objLabFields.LabOrderId.ToString()); return((DataSet)labFieldsManager.ReturnObject(ClsUtility.theParams, "Pr_IQTouch_Laboratory_GetARVMutationDetails", ClsUtility.ObjectEnum.DataSet)); } throw new NotImplementedException(); }
public DataSet IQTouchGetlabDemo(BIQTouchLabFields objLabFields) { lock (this) { ClsObject labFieldsManager = new ClsObject(); ClsUtility.Init_Hashtable(); ClsUtility.AddParameters("@p_flag", SqlDbType.VarChar, objLabFields.Flag.ToString()); ClsUtility.AddParameters("@p_labTestId", SqlDbType.Int, objLabFields.LabTestID.ToString()); ClsUtility.AddParameters("@p_labTestName", SqlDbType.VarChar, objLabFields.LabTestName.ToString()); return((DataSet)labFieldsManager.ReturnObject(ClsUtility.theParams, "pr_Lab_Demo", ClsUtility.ObjectEnum.DataSet)); } throw new NotImplementedException(); }
public DataSet GetPatientLabTestIDTouch(BIQTouchLabFields objLabFields) { lock (this) { ClsObject LabFieldsManager = new ClsObject(); ClsUtility.Init_Hashtable(); ClsUtility.AddParameters("@LabIDs", SqlDbType.VarChar, objLabFields.LabTestIDs); ClsUtility.AddParameters("@Flag", SqlDbType.VarChar, objLabFields.Flag); ClsUtility.AddParameters("@LabName", SqlDbType.VarChar, objLabFields.LabTestName); return((DataSet)LabFieldsManager.ReturnObject(ClsUtility.theParams, "Pr_Laboratory_GetLabTestID", ClsUtility.ObjectEnum.DataSet)); } throw new NotImplementedException(); }
public DataSet IQTouchLaboratory_GetLabOrder(BIQTouchLabFields objLabFields) { lock (this) { ClsObject labFieldsManager = new ClsObject(); ClsUtility.Init_Hashtable(); ClsUtility.AddParameters("@patientid", SqlDbType.VarChar, objLabFields.Ptnpk.ToString()); ClsUtility.AddParameters("@locationid", SqlDbType.Int, objLabFields.LocationId.ToString()); ClsUtility.AddParameters("@LabOrderId", SqlDbType.Int, objLabFields.LabOrderId.ToString()); ClsUtility.AddParameters("@Flag", SqlDbType.VarChar, objLabFields.Flag); return((DataSet)labFieldsManager.ReturnObject(ClsUtility.theParams, "Pr_IQTouch_Laboratory_GetLabOrder", ClsDBUtility.ObjectEnum.DataSet)); } throw new NotImplementedException(); }
protected DataTable GetDataTable(string flag, Int32 labId, string LabName) { BIQTouchLabFields objLabFields = new BIQTouchLabFields(); objLabFields.Flag = flag; objLabFields.LabTestID = labId; objLabFields.LabTestName = LabName; ILabFunctions theILabManager; theILabManager = (ILabFunctions)ObjectFactory.CreateInstance("BusinessProcess.Laboratory.BLabFunctions, BusinessProcess.Laboratory"); DataSet Ds = theILabManager.GetPatientLabTestIDTouch(objLabFields); DataTable dt = Ds.Tables[0]; return(dt); }
protected void BindLabOrder() { BIQTouchLabFields objLabFields = new BIQTouchLabFields(); ILabFunctions theILabManager; theILabManager = (ILabFunctions)ObjectFactory.CreateInstance("BusinessProcess.Laboratory.BLabFunctions, BusinessProcess.Laboratory"); objLabFields.Flag = ""; objLabFields.Ptnpk = Convert.ToInt32(Session["PatientID"]); objLabFields.LocationId = Int32.Parse(Session["AppLocationId"].ToString()); DataSet Ds = theILabManager.IQTouchLaboratory_GetLabOrder(objLabFields); this.grdSearchResult.DataSource = Ds.Tables[0]; BindGrid(); }
//protected DataTable GetDataTable(string flag, Int32 labId, string LabName) //{ // BIQTouchLabFields objLabFields = new BIQTouchLabFields(); // objLabFields.Flag = flag; // objLabFields.LabTestID = labId; // objLabFields.LabTestName = LabName; // ILabFunctions theILabManager; // theILabManager = (ILabFunctions)ObjectFactory.CreateInstance("BusinessProcess.Laboratory.BLabFunctions, BusinessProcess.Laboratory"); // DataSet Ds = theILabManager.IQTouchGetlabDemo(objLabFields); // DataTable dt = Ds.Tables[0]; // return dt; //} protected void BindLabOrder() { BIQTouchLabFields objLabFields = new BIQTouchLabFields(); ILabFunctions theILabManager; theILabManager = (ILabFunctions)ObjectFactory.CreateInstance("BusinessProcess.Laboratory.BLabFunctions, BusinessProcess.Laboratory"); objLabFields.Flag = ""; objLabFields.Ptnpk = Convert.ToInt32(Request.QueryString["PatientID"]); objLabFields.LocationId = Int32.Parse(Session["AppLocationId"].ToString()); DataSet Ds = theILabManager.IQTouchLaboratory_GetLabOrder(objLabFields); DataTable dtOrder = Ds.Tables[0]; RadGridLabOrder.DataSource = dtOrder; RadGridLabOrder.DataBind(); if (RadGridLabOrder.Items.Count == 0) { RadGridLabOrder.DataSource = new Object[0]; } }
protected void SaveLabOrder() { //Default code for User Control Load ScriptManager.RegisterStartupScript(Page, Page.GetType(), "loadpharm", "parent.ShowLoading()", true); Session["IsFirstLoad"] = "true"; List <BIQTouchLabFields> list = new List <BIQTouchLabFields>(); List <BIQTouchLabFields> listArv = new List <BIQTouchLabFields>(); try { // Validation Function Code to be write here // Asigning value for saving BIQTouchLabFields objLabFields = new BIQTouchLabFields(); objLabFields.Ptnpk = Convert.ToInt32(Request.QueryString["PatientID"]); objLabFields.LocationId = Convert.ToInt32(Session["AppLocationId"].ToString()); objLabFields.UserId = Convert.ToInt32(Session["AppUserId"].ToString()); objLabFields.OrderedByName = Convert.ToInt32(rcbOrderBy.SelectedValue.ToString()); objLabFields.OrderedByDate = DateGiven(RadDateOrder.SelectedDate.ToString()); objLabFields.IntFlag = 0; objLabFields.LabTestID = 0; if (dtVisitDate.DbSelectedDate != null) { objLabFields.PreClinicLabDate = DateGiven(dtVisitDate.SelectedDate.ToString()); } else { objLabFields.PreClinicLabDate = DateGiven(""); } objLabFields.LabOrderId = 0; objLabFields.TestResults = ""; objLabFields.TestResultId = 0; if (RadDateReportDate.DbSelectedDate != null) { objLabFields.ReportedByDate = DateGiven(RadDateReportDate.SelectedDate.ToString()); } else { objLabFields.ReportedByDate = DateGiven(""); } // objLabFields.ReportedByDate = DateGiven(RadDateReportDate.DbSelectedDate.ToString()); if (rcbReportedBy.SelectedValue != "") { objLabFields.ReportedByName = Convert.ToInt32(rcbReportedBy.SelectedValue.ToString()); } else { objLabFields.ReportedByName = 0; } foreach (GridDataItem item in RadGridLabTest.Items) { Label lblLabSubTestID = (Label)item.FindControl("lblLabSubTestID"); Label lblLabTestID = (Label)item.FindControl("lblLabTestID"); BIQTouchLabFields objLabFields1 = new BIQTouchLabFields(); objLabFields1.Ptnpk = Convert.ToInt32(Request.QueryString["PatientID"]); objLabFields1.LocationId = Convert.ToInt32(Session["AppLocationId"].ToString()); objLabFields1.UserId = Convert.ToInt32(Session["AppUserId"].ToString()); objLabFields1.OrderedByDate = DateGiven(RadDateOrder.SelectedDate.ToString()); objLabFields1.IntFlag = 1; objLabFields1.LabTestID = Convert.ToInt32(lblLabTestID.Text.ToString()); objLabFields1.SubTestID = Convert.ToInt32(lblLabSubTestID.Text.ToString()); objLabFields1.PreClinicLabDate = DateGiven(""); objLabFields1.ReportedByDate = DateGiven(""); //objLabFields1.ReportedByDate = DateGiven(RadDateReportDate.DbSelectedDate.ToString()); objLabFields1.ReportedByName = 0; objLabFields1.Flag = "N"; objLabFields1.LabOrderId = 0; objLabFields1.TestResults = ""; objLabFields1.TestResultId = 0; list.Add(objLabFields1); } DataTable theDT = new DataTable(); ILabFunctions theILabManager; DataTable dtcustfield = new DataTable(); theILabManager = (ILabFunctions)ObjectFactory.CreateInstance("BusinessProcess.Laboratory.BLabFunctions, BusinessProcess.Laboratory"); int result = theILabManager.IQTouchSaveLabOrderTests(objLabFields, list, listArv, theDT, dtcustfield); if (result > 0) { ScriptManager.RegisterStartupScript(Page, Page.GetType(), "saveSuc", "alert('Form saved successfully')", true); LabSummaryPage(); //ScriptManager.RegisterStartupScript(Page, Page.GetType(), "goBack", "BackBtnClick();", true); } // Response.Redirect(Request.RawUrl); } catch (Exception ex) { IsError = true; //ScriptManager.RegisterStartupScript(Page, Page.GetType(), "saveFail", "alert('An errror occured please contact your Administrator')", true); } finally { if (IsError) { //ScriptManager.RegisterStartupScript(Page, Page.GetType(), "saveFail", "alert('An errror occured please contact your Administrator')", true); //ScriptManager.RegisterStartupScript(Page, Page.GetType(), "clsLoadingPanelDueToError", "parent.CloseLoading();", true); } } }
public int IQTouchSaveLabOrderTests(BIQTouchLabFields objLabFields, List <BIQTouchLabFields> labIds, List <BIQTouchLabFields> ArvMutationFields, DataTable theDTGenXpert) { ClsObject labManagerTest = new ClsObject(); int theRowAffected = 0; int totalRowInserted = 0; try { this.Connection = DataMgr.GetConnection(); this.Transaction = DataMgr.BeginTransaction(this.Connection); labManagerTest.Connection = this.Connection; labManagerTest.Transaction = this.Transaction; ClsUtility.Init_Hashtable(); ClsUtility.AddParameters("@Ptn_pk", SqlDbType.Int, objLabFields.Ptnpk.ToString()); ClsUtility.AddParameters("@LocationID", SqlDbType.Int, objLabFields.LocationId.ToString()); ClsUtility.AddParameters("@UserId", SqlDbType.Int, objLabFields.UserId.ToString()); ClsUtility.AddParameters("@ParameterID", SqlDbType.Int, "0"); ClsUtility.AddParameters("@OrderedByName", SqlDbType.Int, objLabFields.OrderedByName.ToString()); if (objLabFields.OrderedByDate.Year.ToString() != "1900") { ClsUtility.AddParameters("@OrderedByDate", SqlDbType.VarChar, String.Format("{0:dd-MMM-yyyy}", objLabFields.OrderedByDate)); } ClsUtility.AddParameters("@Flag", SqlDbType.Int, objLabFields.IntFlag.ToString()); ClsUtility.AddParameters("@LabID", SqlDbType.VarChar, objLabFields.LabTestID.ToString()); ClsUtility.AddParameters("@FlagExist", SqlDbType.Int, "0"); if (objLabFields.PreClinicLabDate.Year.ToString() != "1900") { ClsUtility.AddParameters("@PreClinicLabDate", SqlDbType.VarChar, String.Format("{0:dd-MMM-yyyy}", objLabFields.PreClinicLabDate)); } ClsUtility.AddParameters("@ReportedBy", SqlDbType.Int, objLabFields.ReportedByName.ToString()); if (objLabFields.ReportedByDate.Year.ToString() != "1900") { ClsUtility.AddParameters("@ReportedByDate", SqlDbType.VarChar, String.Format("{0:dd-MMM-yyyy}", objLabFields.ReportedByDate)); } ClsUtility.AddParameters("@LabOrderId", SqlDbType.Int, objLabFields.LabOrderId.ToString()); ClsUtility.AddParameters("@TestResults", SqlDbType.VarChar, objLabFields.TestResults); ClsUtility.AddParameters("@TestResultId", SqlDbType.Int, objLabFields.TestResultId.ToString()); ClsUtility.AddParameters("@DeleteFlag", SqlDbType.VarChar, "N"); theRowAffected = (int)labManagerTest.ReturnObject(ClsUtility.theParams, "Pr_IQTouch_Laboratory_AddLabOrderTests", ClsUtility.ObjectEnum.ExecuteNonQuery); totalRowInserted = totalRowInserted + theRowAffected; if (labIds.Count > 0) { foreach (var Value in labIds) { ClsUtility.Init_Hashtable(); ClsUtility.AddParameters("@Ptn_pk", SqlDbType.Int, Value.Ptnpk.ToString()); ClsUtility.AddParameters("@LocationID", SqlDbType.Int, Value.LocationId.ToString()); ClsUtility.AddParameters("@UserId", SqlDbType.Int, Value.UserId.ToString()); ClsUtility.AddParameters("@ParameterID", SqlDbType.Int, Value.SubTestID.ToString()); ClsUtility.AddParameters("@OrderedByName", SqlDbType.Int, Value.OrderedByName.ToString()); if (Value.OrderedByDate.Year.ToString() != "1900") { ClsUtility.AddParameters("@OrderedByDate", SqlDbType.VarChar, String.Format("{0:dd-MMM-yyyy}", Value.OrderedByDate)); } ClsUtility.AddParameters("@Flag", SqlDbType.Int, Value.IntFlag.ToString()); ClsUtility.AddParameters("@LabID", SqlDbType.VarChar, Value.LabTestID.ToString()); ClsUtility.AddParameters("@FlagExist", SqlDbType.Int, "0"); if (Value.PreClinicLabDate.Year.ToString() != "1900") { ClsUtility.AddParameters("@PreClinicLabDate", SqlDbType.VarChar, String.Format("{0:dd-MMM-yyyy}", Value.PreClinicLabDate)); } ClsUtility.AddParameters("@ReportedBy", SqlDbType.Int, Value.ReportedByName.ToString()); if (Value.ReportedByDate.Year.ToString() != "1900") { ClsUtility.AddParameters("@ReportedByDate", SqlDbType.VarChar, String.Format("{0:dd-MMM-yyyy}", Value.ReportedByDate)); } ClsUtility.AddParameters("@LabOrderId", SqlDbType.Int, Value.LabOrderId.ToString()); ClsUtility.AddParameters("@TestResults", SqlDbType.VarChar, Value.TestResults); ClsUtility.AddParameters("@TestResultId", SqlDbType.Int, Value.TestResultId.ToString()); ClsUtility.AddParameters("@DeleteFlag", SqlDbType.VarChar, Value.Flag.ToString()); theRowAffected = (int)labManagerTest.ReturnObject(ClsUtility.theParams, "Pr_IQTouch_Laboratory_AddLabOrderTests", ClsUtility.ObjectEnum.ExecuteNonQuery); totalRowInserted = totalRowInserted + theRowAffected; } } if (ArvMutationFields.Count > 0) { foreach (var ValueArv in ArvMutationFields) { ClsUtility.Init_Hashtable(); ClsUtility.AddParameters("@LabOrderId", SqlDbType.Int, ValueArv.LabOrderId.ToString()); ClsUtility.AddParameters("@ParameterID", SqlDbType.Int, ValueArv.SubTestID.ToString()); ClsUtility.AddParameters("@UserId", SqlDbType.Int, ValueArv.UserId.ToString()); ClsUtility.AddParameters("@MutationID", SqlDbType.Int, ValueArv.MutationID.ToString()); ClsUtility.AddParameters("@OtherMutation", SqlDbType.VarChar, ValueArv.OtherMutation.ToString()); ClsUtility.AddParameters("@DeleteFlag", SqlDbType.VarChar, ValueArv.Flag.ToString()); theRowAffected = (int)labManagerTest.ReturnObject(ClsUtility.theParams, "Pr_IQTouch_Laboratory_AddArvMutationDetails", ClsUtility.ObjectEnum.ExecuteNonQuery); totalRowInserted = totalRowInserted + theRowAffected; } } if (theDTGenXpert.Rows.Count > 0) { foreach (DataRow theDR in theDTGenXpert.Rows) { ClsUtility.Init_Hashtable(); ClsUtility.AddParameters("@LabOrderId", SqlDbType.Int, theDR["LabId"].ToString()); ClsUtility.AddParameters("@ABFID", SqlDbType.Int, theDR["ABFID"].ToString()); ClsUtility.AddParameters("@ABFText", SqlDbType.Int, theDR["ABFText"].ToString()); ClsUtility.AddParameters("@GeneXpertID", SqlDbType.Int, theDR["GeneXpertID"].ToString()); ClsUtility.AddParameters("@GeneXpertText", SqlDbType.Int, theDR["GeneXpertText"].ToString()); ClsUtility.AddParameters("@CultSens", SqlDbType.Int, theDR["CultSens"].ToString()); ClsUtility.AddParameters("@CultSensText", SqlDbType.Int, theDR["CultSensText"].ToString()); ClsUtility.AddParameters("@ParameterID", SqlDbType.Int, theDR["ParameterID"].ToString()); theRowAffected = (int)labManagerTest.ReturnObject(ClsUtility.theParams, "Pr_IQTouch_Laboratory_AddGenXpertDetails", ClsUtility.ObjectEnum.ExecuteNonQuery); totalRowInserted = totalRowInserted + theRowAffected; } } DataMgr.CommitTransaction(this.Transaction); DataMgr.ReleaseConnection(this.Connection); return(totalRowInserted); } catch { DataMgr.RollBackTransation(this.Transaction); throw; } finally { if (this.Connection != null) { DataMgr.ReleaseConnection(this.Connection); } } }
public int IQTouchSaveLabOrderTests(BIQTouchLabFields objLabFields, List <BIQTouchLabFields> labIds, List <BIQTouchLabFields> ArvMutationFields, DataTable theDTGenXpert, DataTable theCustomFieldData) { ClsObject labManagerTest = new ClsObject(); int theRowAffected = 0; int totalRowInserted = 0; int LabId = 0; try { this.Connection = DataMgr.GetConnection(); this.Transaction = DataMgr.BeginTransaction(this.Connection); labManagerTest.Connection = this.Connection; labManagerTest.Transaction = this.Transaction; ClsUtility.Init_Hashtable(); ClsUtility.AddParameters("@Ptn_pk", SqlDbType.Int, objLabFields.Ptnpk.ToString()); ClsUtility.AddParameters("@LocationID", SqlDbType.Int, objLabFields.LocationId.ToString()); ClsUtility.AddParameters("@UserId", SqlDbType.Int, objLabFields.UserId.ToString()); ClsUtility.AddParameters("@ParameterID", SqlDbType.Int, "0"); ClsUtility.AddParameters("@OrderedByName", SqlDbType.Int, objLabFields.OrderedByName.ToString()); if (objLabFields.OrderedByDate.Year.ToString() != "1900") { ClsUtility.AddParameters("@OrderedByDate", SqlDbType.VarChar, String.Format("{0:dd-MMM-yyyy}", objLabFields.OrderedByDate)); } ClsUtility.AddParameters("@Flag", SqlDbType.Int, objLabFields.IntFlag.ToString()); ClsUtility.AddParameters("@LabID", SqlDbType.VarChar, objLabFields.LabTestID.ToString()); ClsUtility.AddParameters("@FlagExist", SqlDbType.Int, "0"); if (objLabFields.PreClinicLabDate.Year.ToString() != "1900") { ClsUtility.AddParameters("@PreClinicLabDate", SqlDbType.VarChar, String.Format("{0:dd-MMM-yyyy}", objLabFields.PreClinicLabDate)); } ClsUtility.AddParameters("@ReportedBy", SqlDbType.Int, objLabFields.ReportedByName.ToString()); if (objLabFields.ReportedByDate.Year.ToString() != "1900") { ClsUtility.AddParameters("@ReportedByDate", SqlDbType.VarChar, String.Format("{0:dd-MMM-yyyy}", objLabFields.ReportedByDate)); } ClsUtility.AddParameters("@LabOrderId", SqlDbType.Int, objLabFields.LabOrderId.ToString()); ClsUtility.AddParameters("@TestResults", SqlDbType.VarChar, objLabFields.TestResults); ClsUtility.AddParameters("@TestResultId", SqlDbType.Int, objLabFields.TestResultId.ToString()); ClsUtility.AddParameters("@DeleteFlag", SqlDbType.VarChar, "N"); ClsUtility.AddParameters("@SystemId", SqlDbType.Int, objLabFields.SystemId.ToString()); DataTable thedt = (DataTable)labManagerTest.ReturnObject(ClsUtility.theParams, "Pr_IQTouch_Laboratory_AddLabOrderTests", ClsDBUtility.ObjectEnum.DataTable); totalRowInserted = totalRowInserted + thedt.Rows.Count; if (thedt.Rows.Count > 0) { LabId = Convert.ToInt32(thedt.Rows[0]["LabOrderId"]); } if (labIds.Count > 0) { foreach (var Value in labIds) { ClsUtility.Init_Hashtable(); ClsUtility.AddParameters("@Ptn_pk", SqlDbType.Int, Value.Ptnpk.ToString()); ClsUtility.AddParameters("@LocationID", SqlDbType.Int, Value.LocationId.ToString()); ClsUtility.AddParameters("@UserId", SqlDbType.Int, Value.UserId.ToString()); ClsUtility.AddParameters("@ParameterID", SqlDbType.Int, Value.SubTestID.ToString()); ClsUtility.AddParameters("@OrderedByName", SqlDbType.Int, Value.OrderedByName.ToString()); if (Value.OrderedByDate.Year.ToString() != "1900") { ClsUtility.AddParameters("@OrderedByDate", SqlDbType.VarChar, String.Format("{0:dd-MMM-yyyy}", Value.OrderedByDate)); } ClsUtility.AddParameters("@Flag", SqlDbType.Int, Value.IntFlag.ToString()); ClsUtility.AddParameters("@LabID", SqlDbType.VarChar, Value.LabTestID.ToString()); ClsUtility.AddParameters("@FlagExist", SqlDbType.Int, "0"); if (Value.PreClinicLabDate.Year.ToString() != "1900") { ClsUtility.AddParameters("@PreClinicLabDate", SqlDbType.VarChar, String.Format("{0:dd-MMM-yyyy}", Value.PreClinicLabDate)); } ClsUtility.AddParameters("@ReportedBy", SqlDbType.Int, Value.ReportedByName.ToString()); if (Value.ReportedByDate.Year.ToString() != "1900") { ClsUtility.AddParameters("@ReportedByDate", SqlDbType.VarChar, String.Format("{0:dd-MMM-yyyy}", Value.ReportedByDate)); } ClsUtility.AddParameters("@LabOrderId", SqlDbType.Int, Value.LabOrderId.ToString()); ClsUtility.AddParameters("@TestResults", SqlDbType.VarChar, Value.TestResults); ClsUtility.AddParameters("@TestResultId", SqlDbType.Int, Value.TestResultId.ToString()); ClsUtility.AddParameters("@DeleteFlag", SqlDbType.VarChar, Value.Flag.ToString()); ClsUtility.AddParameters("@SystemId", SqlDbType.Int, Value.SystemId.ToString()); theRowAffected = (int)labManagerTest.ReturnObject(ClsUtility.theParams, "Pr_IQTouch_Laboratory_AddLabOrderTests", ClsDBUtility.ObjectEnum.ExecuteNonQuery); totalRowInserted = totalRowInserted + theRowAffected; } } if (ArvMutationFields.Count > 0) { foreach (var ValueArv in ArvMutationFields) { ClsUtility.Init_Hashtable(); ClsUtility.AddParameters("@LabOrderId", SqlDbType.Int, ValueArv.LabOrderId.ToString()); ClsUtility.AddParameters("@ParameterID", SqlDbType.Int, ValueArv.SubTestID.ToString()); ClsUtility.AddParameters("@UserId", SqlDbType.Int, ValueArv.UserId.ToString()); ClsUtility.AddParameters("@MutationID", SqlDbType.Int, ValueArv.MutationID.ToString()); ClsUtility.AddParameters("@ARVTypeID", SqlDbType.Int, ValueArv.ArvTypeID.ToString()); ClsUtility.AddParameters("@OtherMutation", SqlDbType.VarChar, ValueArv.OtherMutation.ToString()); ClsUtility.AddParameters("@DeleteFlag", SqlDbType.VarChar, ValueArv.Flag.ToString()); theRowAffected = (int)labManagerTest.ReturnObject(ClsUtility.theParams, "Pr_IQTouch_Laboratory_AddArvMutationDetails", ClsDBUtility.ObjectEnum.ExecuteNonQuery); totalRowInserted = totalRowInserted + theRowAffected; } } if (theDTGenXpert.Rows.Count > 0) { foreach (DataRow theDR in theDTGenXpert.Rows) { ClsUtility.Init_Hashtable(); ClsUtility.AddParameters("@LabOrderId", SqlDbType.Int, theDR["LabId"].ToString()); ClsUtility.AddParameters("@ABFID", SqlDbType.Int, theDR["ABFID"].ToString()); ClsUtility.AddParameters("@ABFText", SqlDbType.Int, theDR["ABFText"].ToString()); ClsUtility.AddParameters("@GeneXpertID", SqlDbType.Int, theDR["GeneXpertID"].ToString()); ClsUtility.AddParameters("@GeneXpertText", SqlDbType.Int, theDR["GeneXpertText"].ToString()); ClsUtility.AddParameters("@CultSens", SqlDbType.Int, theDR["CultSens"].ToString()); ClsUtility.AddParameters("@CultSensText", SqlDbType.Int, theDR["CultSensText"].ToString()); ClsUtility.AddParameters("@ParameterID", SqlDbType.Int, theDR["ParameterID"].ToString()); theRowAffected = (int)labManagerTest.ReturnObject(ClsUtility.theParams, "Pr_IQTouch_Laboratory_AddGenXpertDetails", ClsDBUtility.ObjectEnum.ExecuteNonQuery); totalRowInserted = totalRowInserted + theRowAffected; } } //// Custom Fields ////////////// ////////////PreSet Values Used///////////////// /// #99# --- Ptn_Pk /// #88# --- LocationId /// #77# --- Visit_Pk /// #66# --- Visit_Date /// #55# --- Ptn_Pharmacy_Pk /// #44# --- OrderedByDate /// #33# --- LabId /// #22# --- TrackingId /// #11# --- CareEndedId /// #00# --- HomeVisitId /////////////////////////////////////////////// //ClsObject theCustomManager = new ClsObject(); for (Int32 i = 0; i < theCustomFieldData.Rows.Count; i++) { ClsUtility.Init_Hashtable(); string theQuery = theCustomFieldData.Rows[i]["Query"].ToString(); theQuery = theQuery.Replace("#99#", objLabFields.Ptnpk.ToString()); theQuery = theQuery.Replace("#88#", objLabFields.LocationId.ToString()); theQuery = theQuery.Replace("#33#", LabId.ToString()); theQuery = theQuery.Replace("#44#", "'" + String.Format("{0:dd-MMM-yyyy}", objLabFields.OrderedByDate) + "'"); ClsUtility.AddParameters("@QryString", SqlDbType.VarChar, theQuery); int RowsAffected = (Int32)labManagerTest.ReturnObject(ClsUtility.theParams, "pr_General_Dynamic_Insert", ClsDBUtility.ObjectEnum.ExecuteNonQuery); } //////////////////////////////// DataMgr.CommitTransaction(this.Transaction); DataMgr.ReleaseConnection(this.Connection); return(totalRowInserted); } catch { DataMgr.RollBackTransation(this.Transaction); throw; } finally { if (this.Connection != null) { DataMgr.ReleaseConnection(this.Connection); } } }