private void BindControls() { BindFunctions theBindManager = new BindFunctions(); IQCareUtils theUtils = new IQCareUtils(); DataSet theDSXML = new DataSet(); DataTable theDT = new DataTable(); theDSXML.ReadXml(Server.MapPath("..\\XMLFiles\\AllMasters.con")); if (theDSXML.Tables["Mst_Employee"] != null) { theDV = new DataView(theDSXML.Tables["Mst_Employee"]); theDV.RowFilter = "DeleteFlag=0"; if (theDV.Table != null) { theDT = (DataTable)theUtils.CreateTableFromDataView(theDV); if (Convert.ToInt32(Session["AppUserEmployeeId"]) > 0) { theDV = new DataView(theDT); theDV.RowFilter = "EmployeeId =" + Session["AppUserEmployeeId"].ToString(); if (theDV.Count > 0) { theDT = theUtils.CreateTableFromDataView(theDV); } } theBindManager.BindCombo(ddlaborderedbyname, theDT, "EmployeeName", "EmployeeId"); theDV.Dispose(); theDT.Clear(); } } if (Convert.ToInt32(Session["Lab_ID"]) > 0) { BindDropdownOrderBy(DTtestDate.Rows[0]["OrderedbyName"].ToString()); ddlaborderedbyname.SelectedValue = DTtestDate.Rows[0]["OrderedbyName"].ToString(); txtlaborderedbydate.Text = String.Format("{0:dd-MMM-yyyy}", Convert.ToDateTime(DTtestDate.Rows[0]["OrderedbyDate"])); if (DTtestDate.Rows[0].IsNull("PreClinicLabDate") == false) { if (((DateTime)DTtestDate.Rows[0]["PreClinicLabDate"]).ToString(Session["AppDateFormat"].ToString()) != "01-Jan-1900") { this.txtLabtobeDone.Text = (((DateTime)DTtestDate.Rows[0]["PreClinicLabDate"]).ToString(Session["AppDateFormat"].ToString())).ToString(); } } if (this.txtLabtobeDone.Text != "") { this.preclinicLabs.Checked = true; } dtLabTest = (DataTable)ViewState["LabTestID"]; LoadLabResult((DataTable)ViewState["LabTestID"]); } }
protected void Page_Load(object sender, EventArgs e) { if (IsPostBack) { return; } //Bind the userName drop down with all active users //DataTable theUserDt; //Iuser UManager = (Iuser)ObjectFactory.CreateInstance("BusinessProcess.Administration.BUser, BusinessProcess.Administration"); //theUserDt = (UManager.GetUserList()).Tables[0]; ddWaitingFor.Visible = false; lblWaitingfor.Visible = false; using (DataSet theDSXML = new DataSet()) { theDSXML.ReadXml(MapPath(".\\XMLFiles\\AllMasters.con")); IQCareUtils theUtils = new IQCareUtils(); BindFunctions BindManager = new BindFunctions(); DataView theDV = new DataView(theDSXML.Tables["Mst_Decode"]); theDV.RowFilter = "DeleteFlag=0 and CodeID=214"; if (theDV.Table != null) { DataTable theDT = (DataTable)theUtils.CreateTableFromDataView(theDV); DataRow dr = theDT.NewRow(); dr["Name"] = "Consultation"; dr["ID"] = 1; theDT.Rows.Add(dr); dr = theDT.NewRow(); dr["Name"] = "Laboratory"; dr["ID"] = 3; theDT.Rows.Add(dr); dr = theDT.NewRow(); dr["Name"] = "Pharmacy"; dr["ID"] = 4; theDT.Rows.Add(dr); dr = theDT.NewRow(); dr["Name"] = "Triage"; dr["ID"] = 5; theDT.Rows.Add(dr); BindManager.BindCombo(ddwaitingList, theDT, "Name", "ID"); //BindUserDropdown(ddWList, string.Empty); //BindUserDropdown(ddWList, Session["AppUserId"].ToString()); theDT.Clear(); } theDV.Dispose(); } }
private void FillDropDownsWard(int District) { ICustomList CustomManager; CustomManager = (ICustomList)ObjectFactory.CreateInstance("BusinessProcess.Administration.BCustomList,BusinessProcess.Administration"); BindFunctions BindManager = new BindFunctions(); IQCareUtils theUtils = new IQCareUtils(); DataSet Ward = new DataSet(); Ward = CustomManager.GetWard(District, Convert.ToInt32(Session["SystemId"])); BindManager.BindCombo(ddWard, Ward.Tables[0], "Name", "ID"); }
protected void txtAllergen_TextChanged(object sender, EventArgs e) { IQCareUtils theUtils = new IQCareUtils(); DataView theAutoDV; DataView theExistsDV; DataSet theAutoDS = (DataSet)ViewState["MasterData"]; int DrugId; if (hdCustID.Value != "") { if ((Convert.ToInt32(hdCustID.Value) != 0)) { DrugId = Convert.ToInt32(hdCustID.Value); theAutoDV = new DataView(theAutoDS.Tables[0]); theAutoDV.RowFilter = "Drug_Pk = " + DrugId; DataTable theAutoDT = (DataTable)theUtils.CreateTableFromDataView(theAutoDV); if (Session["AddARV"] == null) { DataTable theDT = new DataTable(); theDT.Columns.Add("DrugId", System.Type.GetType("System.Int32")); theDT.Columns.Add("DrugName", System.Type.GetType("System.String")); theDT.Columns.Add("Generic", System.Type.GetType("System.Int32")); theDT.Columns.Add("DrugTypeId", System.Type.GetType("System.Int32")); Session["AddARV"] = theDT; } DataTable ExistDT = (DataTable)Session["AddARV"]; theExistsDV = new DataView(ExistDT); theExistsDV.RowFilter = "DrugId =" + theAutoDT.Rows[0]["Drug_pk"]; DataTable theSelExistsDT = (DataTable)theUtils.CreateTableFromDataView(theExistsDV); if (theSelExistsDT.Rows.Count == 0) { DataRow DR = ExistDT.NewRow(); DR[0] = theAutoDT.Rows[0]["Drug_pk"]; DR[1] = theAutoDT.Rows[0]["DrugName"]; DR[2] = 0; DR[3] = theAutoDT.Rows[0]["DrugTypeId"]; ExistDT.Rows.Add(DR); } else { IQCareMsgBox.Show("DrugExists", this); txtAllergen.Text = ""; return; } hdCustID.Value = ""; } } else { txtAllergen.Text = ""; hdCustID.Value = ""; } }
/// <summary> /// Bind Dropdown Data /// </summary> private void fillSubDdlData() { BindFunctions BindManager = new BindFunctions(); IQCareUtils theUtils = new IQCareUtils(); DataTable theDT = new DataTable(); DataSet theDSXML = new DataSet(); theDSXML.ReadXml(MapPath("..\\XMLFiles\\AllMasters.con")); DataView theDV; txtAllergenOther.Visible = true; txtAllergenOther.Text = ""; if (ddlAllergyType.SelectedItem.Value != "207" && ddlAllergyType.SelectedItem.Value != "211" && ddlAllergyType.SelectedItem.Text != "Select") { ddlAllergen.Visible = true; txtAllergen.Visible = false; txtAllergen.Text = ""; txtAllergenOther.Visible = false; txtAllergenOther.Text = ""; if (ddlAllergyType.SelectedItem.Value == "208") { theDV = new DataView(theDSXML.Tables["Mst_Decode"]); theDV.RowFilter = "DeleteFlag=0 and CodeID=208"; if (theDV.Table != null) { theDT = (DataTable)theUtils.CreateTableFromDataView(theDV); BindManager.BindCombo(ddlAllergen, theDT, "Name", "ID"); theDV.Dispose(); theDT.Clear(); } } else if (ddlAllergyType.SelectedItem.Value == "209") { theDV = new DataView(theDSXML.Tables["Mst_Decode"]); theDV.RowFilter = "DeleteFlag=0 and CodeID=209"; if (theDV.Table != null) { theDT = (DataTable)theUtils.CreateTableFromDataView(theDV); BindManager.BindCombo(ddlAllergen, theDT, "Name", "ID"); theDV.Dispose(); theDT.Clear(); } } } else if (ddlAllergyType.SelectedItem.Value == "207") { txtAllergen.Visible = true; txtAllergen.Text = ""; txtAllergenOther.Visible = false; txtAllergenOther.Text = ""; GetPediatricFields(Convert.ToInt32(Session["PatientId"])); } }
//int currentDate; #region "Modified13June07(1)" private void fillDropDownList(int idPurpose, int idEmployee) { IAppointment FormManager; FormManager = (IAppointment)ObjectFactory.CreateInstance("BusinessProcess.Scheduler.BAppointment, BusinessProcess.Scheduler"); DataSet theDtSet = FormManager.GetEmployees(idEmployee); DataSet theDtSetPurpose = FormManager.GetAppointmentReasons(idPurpose); BindFunctions appBind = new BindFunctions(); IQCareUtils theUtils = new IQCareUtils(); if (Request.QueryString["Name"] == "Add") { //if (Convert.ToInt32(Session["PatientVisitId"]) == 0) //{ DataView theDV = new DataView(theDtSet.Tables[0]); DataView TheDV = new DataView(theDtSetPurpose.Tables[0]); theDV.RowFilter = "DeleteFlag=0"; TheDV.RowFilter = "DeleteFlag=0"; if (theDV.Table != null) { DataTable DT = (DataTable)theUtils.CreateTableFromDataView(theDV); if (Convert.ToInt32(Session["AppUserEmployeeId"]) > 0) { theDV = new DataView(DT); //theDV.RowFilter = "EmployeeId IN("+ EmployeeId +" ," + Session["AppUserEmployeeId"].ToString() + ")"; theDV.RowFilter = "EmployeeId =" + Session["AppUserEmployeeId"].ToString(); if (theDV.Count > 0) { DT = theUtils.CreateTableFromDataView(theDV); } } DataTable TheDT = (DataTable)theUtils.CreateTableFromDataView(TheDV); appBind.BindCombo(ddAppProvider, DT, "EmployeeName", "EmployeeId"); appBind.BindCombo(ddAppPurpose, TheDT, "Name", "Id"); theDV.Dispose(); TheDV.Dispose(); DT.Clear(); TheDT.Clear(); } //} } if (Request.QueryString["name"] == "Edit" || Request.QueryString["name"] == "Delete") { BindDropdownOrderBy(theDtSet.Tables[0].Rows[0]["EmployeeName"].ToString()); this.ddAppProvider.SelectedValue = theDtSet.Tables[0].Rows[0]["EmployeeName"].ToString(); //appBind.BindCombo(ddAppProvider, theDtSet.Tables[0], "EmployeeName", "EmployeeId"); appBind.BindCombo(ddAppPurpose, theDtSetPurpose.Tables[0], "Name", "Id"); } }
public string Save(string labtobedone, string laborder, string laborderdate, string appcurrdate) { string strresult = string.Empty; if (FieldValidation(labtobedone, laborderdate, laborder, appcurrdate) == false) { return("false"); } DataTable LabTestIDs = LabTest(); IQCareUtils theUtils = new IQCareUtils(); ILabFunctions LabTestsManager; if (Convert.ToInt32(Session["Lab_ID"]) == 0) { int PatientID = Convert.ToInt32(Session["PatientId"]); int LocationID = Convert.ToInt32(Session["AppLocationId"]); LabTestsManager = (ILabFunctions)ObjectFactory.CreateInstance("BusinessProcess.Laboratory.BLabFunctions, BusinessProcess.Laboratory"); DataSet DSsavedLabID = (DataSet)LabTestsManager.SaveLabOrderTests(PatientID, LocationID, LabTestIDs, Convert.ToInt32(Session["AppUserId"]), Convert.ToInt32(laborder), laborderdate, Convert.ToString(Session["Lab_ID"]), 88, labtobedone); Session["Lab_ID"] = DSsavedLabID.Tables[0].Rows[0]["LabID"].ToString(); ViewState["LabOther"] = DSsavedLabID.Tables[0]; ViewState["LabTestID"] = DSsavedLabID.Tables[1]; ViewState["TestDatetxt"] = laborderdate; } else { int PatientID = Convert.ToInt32(Session["PatientId"]); int LocationID = Convert.ToInt32(Session["ServiceLocationId"]); if (Convert.ToInt32(Session["Lab_ID"]) > 0) { LabTestsManager = (ILabFunctions)ObjectFactory.CreateInstance("BusinessProcess.Laboratory.BLabFunctions, BusinessProcess.Laboratory"); DataSet DSsavedLabID = (DataSet)LabTestsManager.SaveLabOrderTests(PatientID, LocationID, LabTestIDs, Convert.ToInt32(Session["AppUserId"]), Convert.ToInt32(laborder), laborderdate, Convert.ToString(Session["Lab_ID"]), 99, labtobedone); Session["Lab_ID"] = DSsavedLabID.Tables[0].Rows[0]["LabID"].ToString(); ViewState["LabOther"] = DSsavedLabID.Tables[0]; ViewState["LabTestID"] = DSsavedLabID.Tables[1]; ViewState["TestDatetxt"] = laborderdate; } else { LocationID = Convert.ToInt32(Session["AppLocationId"]); LabTestsManager = (ILabFunctions)ObjectFactory.CreateInstance("BusinessProcess.Laboratory.BLabFunctions, BusinessProcess.Laboratory"); DataSet DSsavedLabID = (DataSet)LabTestsManager.SaveLabOrderTests(PatientID, LocationID, LabTestIDs, Convert.ToInt32(Session["AppUserId"]), Convert.ToInt32(laborder), laborderdate, Convert.ToString(Session["Lab_ID"]), 88, labtobedone); Session["Lab_ID"] = DSsavedLabID.Tables[0].Rows[0]["LabID"].ToString(); ViewState["LabOther"] = DSsavedLabID.Tables[0]; ViewState["LabTestID"] = DSsavedLabID.Tables[1]; ViewState["TestDatetxt"] = laborderdate; } } strresult = Session["Lab_ID"].ToString(); return(strresult); }
private void BindTransferDetail() { txtLocationName.Text = Session["AppLocation"].ToString(); txtLocationName.ReadOnly = true; /*Binding Satellite ID*/ BindFunctions BindManager = new BindFunctions(); IQCareUtils theUtils = new IQCareUtils(); DataTable theDT = new DataTable(); DataSet theDS = new DataSet(); IPatientTransfer PatientTransferMgr = (IPatientTransfer)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BPatientTransfer, BusinessProcess.Clinical"); if (btnSave.Text == "Save") { tredit.Visible = false; theDS = PatientTransferMgr.GetSatelliteLocation(PatientId, TransferId, 0, Session["SystemId"].ToString()); txtLocationName.Text = theDS.Tables[0].Rows[0]["CurrentSatName"].ToString(); DataView theDV = new DataView(theDS.Tables[1]); if (theDV.Table != null) { theDT = (DataTable)theUtils.CreateTableFromDataView(theDV); BindManager.BindCombo(ddSatellite, theDT, "Name", "ID"); theDV.Dispose(); theDT.Clear(); } } if (btnSave.Text == "Update") { tredit.Visible = true; theDS = PatientTransferMgr.GetSatelliteLocation(PatientId, TransferId, 1, Session["SystemId"].ToString()); txtLocationNameEdit.Text = theDS.Tables[0].Rows[0]["CurrentSatName"].ToString(); txtLocationNameEdit.Enabled = false; txtFromSatellite.Text = theDS.Tables[2].Rows[0]["TransferfromSatellite"].ToString(); txtFromSatellite.Enabled = false; ViewState["FromID"] = theDS.Tables[2].Rows[0]["TransferredfromID"].ToString(); //ddSatelliteEdit.Enabled = false; TxtTransDateEdit.Text = string.Format("{0:dd-MMM-yyyy}", Convert.ToDateTime(theDS.Tables[2].Rows[0]["TransferredDate"])); ViewState["TransferDate"] = TxtTransDateEdit.Text; DataView theDV = new DataView(theDS.Tables[1]); //theDV.RowFilter = "DeleteFlag=0"; if (theDV.Table != null) { theDT = (DataTable)theUtils.CreateTableFromDataView(theDV); BindManager.BindCombo(ddSatelliteEdit, theDT, "Name", "ID"); theDV.Dispose(); theDT.Clear(); } ddSatelliteEdit.SelectedValue = theDS.Tables[2].Rows[0][3].ToString(); } }
protected void btnsave_Click(object sender, EventArgs e) { if (FieldValidation() == false) { return; } DataTable LabTestIDs = LabTest(); IQCareUtils theUtils = new IQCareUtils(); ILabFunctions LabTestsManager; if (Convert.ToInt32(ViewState["LabID"]) == 0) { int PatientID = Convert.ToInt32(Session["PatientId"]); int LocationID = Convert.ToInt32(Session["AppLocationId"]); LabTestsManager = (ILabFunctions)ObjectFactory.CreateInstance("BusinessProcess.Laboratory.BLabFunctions, BusinessProcess.Laboratory"); DataSet DSsavedLabID = (DataSet)LabTestsManager.SaveLabOrderTests(PatientID, LocationID, LabTestIDs, Convert.ToInt32(Session["AppUserId"]), Convert.ToInt32(ddlaborderedbyname.SelectedValue), txtlaborderedbydate.Text, Convert.ToString(ViewState["LabID"]), 88, ""); ViewState["LabID"] = DSsavedLabID.Tables[0].Rows[0]["LabID"].ToString(); ViewState["LabOther"] = DSsavedLabID.Tables[0]; ViewState["LabTestID"] = DSsavedLabID.Tables[1]; ViewState["TestDatetxt"] = txtlaborderedbydate.Text; SaveCancel(); } else { int PatientID = Convert.ToInt32(Session["PatientId"]); int LocationID = Convert.ToInt32(Session["ServiceLocationId"]); if (Convert.ToInt32(ViewState["LabID"]) > 0) { LabTestsManager = (ILabFunctions)ObjectFactory.CreateInstance("BusinessProcess.Laboratory.BLabFunctions, BusinessProcess.Laboratory"); DataSet DSsavedLabID = (DataSet)LabTestsManager.SaveLabOrderTests(PatientID, LocationID, LabTestIDs, Convert.ToInt32(Session["AppUserId"]), Convert.ToInt32(ddlaborderedbyname.SelectedValue), txtlaborderedbydate.Text, Convert.ToString(ViewState["LabID"]), 99, ""); ViewState["LabID"] = DSsavedLabID.Tables[0].Rows[0]["LabID"].ToString(); ViewState["LabOther"] = DSsavedLabID.Tables[0]; ViewState["LabTestID"] = DSsavedLabID.Tables[1]; ViewState["TestDatetxt"] = txtlaborderedbydate.Text; SaveCancelExist(); } else { LocationID = Convert.ToInt32(Session["AppLocationId"]); LabTestsManager = (ILabFunctions)ObjectFactory.CreateInstance("BusinessProcess.Laboratory.BLabFunctions, BusinessProcess.Laboratory"); DataSet DSsavedLabID = (DataSet)LabTestsManager.SaveLabOrderTests(PatientID, LocationID, LabTestIDs, Convert.ToInt32(Session["AppUserId"]), Convert.ToInt32(ddlaborderedbyname.SelectedValue), txtlaborderedbydate.Text, Convert.ToString(ViewState["LabID"]), 88, ""); ViewState["LabID"] = DSsavedLabID.Tables[0].Rows[0]["LabID"].ToString(); ViewState["LabOther"] = DSsavedLabID.Tables[0]; ViewState["LabTestID"] = DSsavedLabID.Tables[1]; ViewState["TestDatetxt"] = txtlaborderedbydate.Text; SaveCancel(); } } }
private void BindControls() { BindFunctions theBindManager = new BindFunctions(); IQCareUtils theUtils = new IQCareUtils(); DataSet theDSXML = new DataSet(); DataTable theDT = new DataTable(); theDSXML.ReadXml(Server.MapPath("..\\XMLFiles\\AllMasters.con")); if (theDSXML.Tables["Mst_Employee"] != null) { theDV = new DataView(theDSXML.Tables["Mst_Employee"]); theDV.RowFilter = "DeleteFlag=0"; if (theDV.Table != null) { theDT = (DataTable)theUtils.CreateTableFromDataView(theDV); if (Convert.ToInt32(Session["AppUserEmployeeId"]) > 0) { theDV = new DataView(theDT); theDV.RowFilter = "EmployeeId =" + Session["AppUserEmployeeId"].ToString(); if (theDV.Count > 0) { theDT = theUtils.CreateTableFromDataView(theDV); } } theBindManager.BindCombo(ddlaborderedbyname, theDT, "EmployeeName", "EmployeeId"); theDV.Dispose(); theDT.Clear(); } theDSXML.Clear(); theDSXML.ReadXml(Server.MapPath("..\\XMLFiles\\LabMasters.con")); theDV = new DataView(theDSXML.Tables["LabTestOrder"]); theDV.RowFilter = "DeleteFlag=0"; if (theDV.Table != null) { theDV.Sort = "SubTestName asc"; DataTable theLabDt = theDV.ToTable(); theBindManager.BindCheckedList(chkOrderLabTests, theLabDt, "SubTestName", "SubTestId"); theDV.Dispose(); theDT.Clear(); } } if (Convert.ToInt32(ViewState["LabID"]) > 0) { BindDropdownOrderBy(DTtestDate.Rows[0]["OrderedbyName"].ToString()); ddlaborderedbyname.SelectedValue = DTtestDate.Rows[0]["OrderedbyName"].ToString(); txtlaborderedbydate.Text = String.Format("{0:dd-MMM-yyyy}", Convert.ToDateTime(DTtestDate.Rows[0]["OrderedbyDate"])); BindChklistLabs(); } }
private void fillPatientAppointmntDetailsInGrid() { if (Session["PatientId"] != null) { //patientId = Convert.ToInt32(Request.QueryString["Patientid"]); patientId = Convert.ToInt32(Session["PatientId"]); if (Request.QueryString["FormName"] != null) { if (Request.QueryString["FormName"].ToString() == "PatientHome") { locationId = 0; } } else { //locationId = Convert.ToInt32(Request.QueryString["Locationid"]); locationId = Convert.ToInt32(Session["AppLocationId"]); } DataTable DtCareEnd = (DataTable)Session["CEndedStatus"]; DataSet theDs; IAppointment FormManager; IQCareUtils theUtil = new IQCareUtils(); FormManager = (IAppointment)ObjectFactory.CreateInstance("BusinessProcess.Scheduler.BAppointment, BusinessProcess.Scheduler"); theDs = FormManager.GetPatientppointmentDetails(patientId, locationId, 0); if (theDs.Tables[0].Rows.Count > 0) { //(Master.FindControl("lblformname") as Label).Text = "Appointment History For " + theDs.Tables[0].Rows[0]["Name"].ToString(); PatientEnrollmentID = theDs.Tables[0].Rows[0]["PatientEnrollmentId"].ToString(); //PatientStatus = Convert.ToInt32(theDs.Tables[0].Rows[0]["Status"]); if (DtCareEnd.Rows.Count > 0) { PatientStatus = Convert.ToInt32(DtCareEnd.Rows[0]["CareEnded"]); } else { PatientStatus = 0; } Session["patientappdtl"] = "0"; } grdSearchResult.Columns.Clear(); grdSearchResult.DataSource = theDs.Tables[1]; if (!IsPostBack) { ViewState["GrdData"] = theDs.Tables[1]; ViewState["SortDirection"] = "Asc"; } BindGrid(); } }
private void BindItemTypeDropdown() { IQCareUtils theUtils = new IQCareUtils(); ddlItemType.Items.Clear(); IMasterList objProgramlist = (IMasterList)ObjectFactory.CreateInstance("BusinessProcess.SCM.BMasterList,BusinessProcess.SCM"); DataSet theDT = objProgramlist.GetDrugTypeIQMGT(0); //DataView theDV = new DataView(theDT); //theDV.RowFilter = "ItemType <> 'Lab Tests' and DeleteFlag = 0"; BindFunctions theBind = new BindFunctions(); theBind.Win_BindCombo(ddlItemType, theDT.Tables[1], "Name", "ID"); }
private void SortAndSetDataInGrid(String SortExpression) { IQCareUtils clsUtil = new IQCareUtils(); DataView theDV; theDV = clsUtil.GridSort((DataTable)ViewState["grdDataSource"], SortExpression, ViewState["SortDirection"].ToString()); //grdSearchResult.DataSource = null; grdSearchResult.Columns.Clear(); grdSearchResult.DataSource = theDV; BindGrid(); }
private void BindEmpoyee(RadComboBox rcb) { DataSet theDS = new DataSet(); theDS.ReadXml(MapPath("..\\..\\XMLFiles\\ALLMasters.con")); BindFunctions BindManager = new BindFunctions(); IQCareUtils theUtils = new IQCareUtils(); rcb.DataSource = null; rcb.Items.Clear(); if (theDS.Tables["Mst_Employee"] != null) { DataView theDV = new DataView(theDS.Tables["Mst_Employee"]); if (Convert.ToInt32(Session["PatientVisitId"]) == 0) { theDV.RowFilter = "DeleteFlag=0"; if (theDV.Table != null) { DataTable theDT = theUtils.CreateTableFromDataView(theDV); if (Convert.ToInt32(Session["AppUserEmployeeId"]) > 0) { theDV = new DataView(theDT); theDV.RowFilter = "EmployeeId =" + Session["AppUserEmployeeId"].ToString(); if (theDV.Count > 0) { theDT = theUtils.CreateTableFromDataView(theDV); } } BindManager.BindCombo(rcb, theDT, "EmployeeName", "EmployeeId"); } } else { if (theDV.Table != null) { DataTable theDT = theUtils.CreateTableFromDataView(theDV); if (Convert.ToInt32(Session["AppUserEmployeeId"]) > 0) { theDV = new DataView(theDT); theDV.RowFilter = "EmployeeId =" + Session["AppUserEmployeeId"].ToString(); if (theDV.Count > 0) { theDT = theUtils.CreateTableFromDataView(theDV); } } BindManager.BindCombo(rcb, theDT, "EmployeeName", "EmployeeId"); } } } }
private void BindStoreNameDropdown(int UserID) { IQCareUtils theUtils = new IQCareUtils(); ddlStoreName.Items.Clear(); IMasterList objProgramlist = (IMasterList)ObjectFactory.CreateInstance("BusinessProcess.SCM.BMasterList,BusinessProcess.SCM"); DataTable theDT = objProgramlist.GetStoreByUser(UserID); DataView theDV = new DataView(theDT); BindFunctions theBind = new BindFunctions(); switch (GblIQCare.CurrentMenu) { case MenuChoice.PurchaseOrder: //purchase order or good received note case MenuChoice.GoodReceived: case MenuChoice.POWithGRN: theDV.RowFilter = "StoreCategory = 'Purchasing' OR StoreCategory = 'Purchasing and Dispensing' "; break; case MenuChoice.Dispense: theDV.RowFilter = "StoreCategory = 'Dispensing' OR StoreCategory = 'Purchasing and Dispensing' "; break; case MenuChoice.CounterRequistion: //counter requisition case MenuChoice.CRWithIV: theDV.RowFilter = "StoreCategory <> 'Purchasing' OR StoreCategory <> 'Purchasing and Dispensing' "; break; } /*switch (GblIQCare.theArea) * { * case "PO": //purchase order or good received note * case "GRN": * theDV.RowFilter = "StoreCategory = 'Purchasing' "; * break; * case "Dispense": * theDV.RowFilter = "StoreCategory = 'Dispensing' "; * break; * case "CR": //counter requisition * theDV.RowFilter = "StoreCategory <> 'Purchasing' "; * break; * }*/ DataTable theStoreDT = theDV.ToTable(); theBind.Win_BindCombo(ddlStoreName, theStoreDT, "StoreName", "StoreId", "StoreName"); if (theDT.Rows.Count == 1) { ddlStoreName.SelectedIndex = 0; //ddlStoreName.Enabled = false; } }
protected void btnAdd_Click(object sender, EventArgs e) { try { if (lstAvailable.SelectedIndex >= 0) { BindFunctions BindManager = new BindFunctions(); IQCareUtils theUtils = new IQCareUtils(); if (Request.QueryString["Type"] == "Schedule") { DataRow theDR; DataTable theDTAvail = (DataTable)ViewState["MasterTable"]; DataTable theDTSel = (DataTable)ViewState["SelectedData"]; DataView theDV = new DataView(theDTAvail); theDV.RowFilter = "Id =" + lstAvailable.SelectedValue; theDR = theDTSel.NewRow(); theDR[0] = Convert.ToInt32(theDV[0][0]); ////(lstAvailable.SelectedValue); theDR[1] = theDV[0][1].ToString(); theDTSel.Rows.Add(theDR); lstSelected.DataSource = theDTSel; lstSelected.DataBind(); ViewState["SelectedData"] = theDTSel; theDR = null; theDV.Dispose(); // theDR[2] = ""; /////lstAvailable.SelectedItem.Text; DataRow[] theDR1; theDR1 = theDTAvail.Select("Id='" + lstAvailable.SelectedValue + "'"); theDTAvail.Rows.Remove(theDR1[0]); lstAvailable.DataSource = theDTAvail; lstAvailable.DataBind(); ViewState["MasterTable"] = theDTAvail; } } else { IQCareMsgBox.Show("NoItemToAdd", this); } } catch (Exception err) { MsgBuilder theBuilder = new MsgBuilder(); theBuilder.DataElements["MessageText"] = err.Message.ToString(); IQCareMsgBox.Show("#C1", theBuilder, this); } }
/// <summary> /// Validation /// </summary> /// <returns></returns> private Boolean FieldValidation() { IIQCareSystem IQCareSecurity; IQCareSecurity = (IIQCareSystem)ObjectFactory.CreateInstance("BusinessProcess.Security.BIQCareSystem, BusinessProcess.Security"); DateTime theCurrentDate = (DateTime)IQCareSecurity.SystemDate(); IQCareUtils theUtils = new IQCareUtils(); PatientManager = (IAllergyInfo)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BAllergyInfo, BusinessProcess.Clinical"); if (ddlAllergyType.SelectedIndex == 0) { MsgBuilder theMsg = new MsgBuilder(); theMsg.DataElements["Control"] = "Allergy Type"; IQCareMsgBox.Show("BlankDropDown", theMsg, this); return(false); } if (ddlAllergyType.SelectedItem.Value == "207") { if (txtAllergen.Text == "") { MsgBuilder theBuilder = new MsgBuilder(); theBuilder.DataElements["Control"] = "Allergen"; IQCareMsgBox.Show("BlankTextBox", theBuilder, this); txtAllergen.Focus(); return(false); } } else if (ddlAllergyType.SelectedItem.Value == "211") { if (txtAllergenOther.Text == "") { MsgBuilder theBuilder = new MsgBuilder(); theBuilder.DataElements["Control"] = "Allergen"; IQCareMsgBox.Show("BlankTextBox", theBuilder, this); txtAllergenOther.Focus(); return(false); } } else { if (ddlAllergen.SelectedIndex == 0) { MsgBuilder theMsg = new MsgBuilder(); theMsg.DataElements["Control"] = "Allergen"; IQCareMsgBox.Show("BlankDropDown", theMsg, this); return(false); } } return(true); }
//private void SQLCreateJob() //{ // SQLDMO._SQLServer theServer = new SQLDMO.SQLServerClass(); // SQLDMO.Job theJob = new SQLDMO.Job(); // IIQCareSystem SQLManager; // SQLManager = (IIQCareSystem)ObjectFactory.CreateInstance("BusinessProcess.Security.BIQCareSystem, BusinessProcess.Security"); // string constr = SQLManager.GetServerInstance(); // string[] theConStr = constr.Split(';'); // theServer.Connect((theConStr[0].ToString().Split('='))[1].ToString().Trim(), (theConStr[1].ToString().Split('='))[1].ToString().Trim(), (theConStr[2].ToString().Split('='))[1].ToString().Trim()); // theJob.Name = "IQCare Auto-Backup"; // theJob.Description = "IQCare Auto-Backup"; // theJob.Category = "Database Maintenance"; // SQLDMO.JobStep theStep = new SQLDMO.JobStep(); // theStep.SubSystem = "TSQL"; // string theCmd = "declare @InstanceName varchar(1000) "; // theCmd += " declare @dir varchar(500)"; // theCmd += " set @dir = md " + ddBackupDrive.Text + "IQCareDBBackup"; // theCmd += " exec xp_cmdshell @dir"; // theCmd += " set @FileName = " + ddBackupDrive.Text + "IQCareDBBackup" + "\\IQCare + convert(varchar,getdate(),106) +'.bak'"; // theCmd += " set @InstanceName = 'iqcare_backup_' + convert(varchar,getdate(),106)"; // theCmd += " BACKUP DATABASE [IQCare] TO DISK = @FileName WITH NOFORMAT, NOINIT, NAME = @InstanceName, SKIP, REWIND, NOUNLOAD, STATS = 10"; // theStep.Command = theCmd; // theStep.OnSuccessAction = SQLDMO.SQLDMO_JOBSTEPACTION_TYPE.SQLDMOJobStepAction_QuitWithSuccess; // theStep.OnFailAction = SQLDMO.SQLDMO_JOBSTEPACTION_TYPE.SQLDMOJobStepAction_QuitWithFailure; // SQLDMO.JobSchedule theSchedule = new SQLDMO.JobSchedule(); // theSchedule.Schedule.FrequencyType = SQLDMO.SQLDMO_FREQUENCY_TYPE.SQLDMOFreq_Daily; // theSchedule.Schedule.FrequencyInterval = 1; // theSchedule.Schedule.ActiveStartDate = Convert.ToInt32(DateTime.Now.Date.ToString("yyyymmdd")); // theSchedule.Schedule.ActiveStartTimeOfDay = Convert.ToInt32(DateTime.Now.ToString("hhmmss")); // theSchedule.Schedule.ActiveEndDate = 99991231; // theSchedule.Schedule.ActiveEndTimeOfDay = 235959; // //theJob.Remove(); // theServer.JobServer.Jobs.Add(theJob); // theJob.ApplyToTargetServer((theConStr[0].ToString().Split('='))[1].ToString().Trim()); // theJob.JobSteps.Add(theStep); // theJob.BeginAlter(); // theStep.DoAlter(); // theJob.JobSchedules.Add(theSchedule); // theJob.DoAlter(); //} protected void btnOk_Click(object sender, EventArgs e) { int Paperlessclinic = this.chkPaperlessclinic.Checked == true ? 1 : 0; int Preferred = this.chkPreferred.Checked == true ? 1 : 0; DataTable dtModule = AddModule(); //int PMTCTclinic = this.chkPMTCT.Checked == true ? 1 : 0; IFacilitySetup FacilityMgr; IQCareUtils theUtils = new IQCareUtils(); if (Filelogo.PostedFile.FileName != "") { HttpPostedFile theFilelogo = Filelogo.PostedFile; theFilelogo.SaveAs(Server.MapPath(string.Format("..//images//{0}", txtfacilityname.Text + ".jpg"))); } Hashtable htFacilityParameters = new Hashtable(); htFacilityParameters.Add("FacilityLogo", txtfacilityname.Text + ".jpg"); htFacilityParameters.Add("FacilityAddress", txtFacAddress.Text); htFacilityParameters.Add("FacilityTel", txtFactele.Text); htFacilityParameters.Add("FacilityCell", txtFacCell.Text); htFacilityParameters.Add("FacilityFax", txtFacFax.Text); htFacilityParameters.Add("FacilityEmail", txtFacEmail.Text); htFacilityParameters.Add("FacilityFootertext", txtpharmfoottext.Text); htFacilityParameters.Add("FacilityURL", txtFacURL.Text); htFacilityParameters.Add("Facilitytemplate", this.Radio1.Checked == true ? Radio1.Value.ToString() : (this.Radio2.Checked == true ? Radio2.Value.ToString() : "0")); htFacilityParameters.Add("StrongPassword", this.chkStrongPwd.Checked == true ? 1 : 0); htFacilityParameters.Add("ExpirePaswordFlag", this.chkexpPwd.Checked == true ? 1 : 0); htFacilityParameters.Add("ExpirePaswordDays", this.chkexpPwd.Checked == true ? txtnoofdays.Text : ""); htFacilityParameters.Add("DateConstraint", this.chkdateconstraint.Checked == true ? 1 : 0); if (txtPEPFAR_Fund.Text.Trim() == "") { txtPEPFAR_Fund.Text = "01-01-1900"; } try { thePepFarDate = theUtils.MakeDate(txtPEPFAR_Fund.Text); FacilityMgr = (IFacilitySetup)ObjectFactory.CreateInstance("BusinessProcess.Administration.BFacility, BusinessProcess.Administration"); int Rows = FacilityMgr.UpdateFacility(Convert.ToInt32(ViewState["FacilityId"]), txtfacilityname.Text, txtcountryno.Text, txtLPTF.Text, txtSatelliteID.Text, txtNationalId.Text, Convert.ToInt32(ddlprovince.SelectedValue), Convert.ToInt32(ddldistrict.SelectedValue), theFName, Convert.ToInt32(cmbCurrency.SelectedValue), Convert.ToInt32(txtGrace.Text), "dd-MMM-yyyy", Convert.ToDateTime(thePepFarDate), Convert.ToInt32(ddStatus.SelectedValue), Convert.ToInt32(Session["SystemId"]), Preferred, Paperlessclinic, Convert.ToInt32(Session["AppUserId"]), dtModule, htFacilityParameters); Response.Redirect(".././frmLogin.aspx"); } catch (Exception err) { MsgBuilder theBuilder = new MsgBuilder(); theBuilder.DataElements["MessageText"] = err.Message.ToString(); IQCareMsgBox.Show("#C1", theBuilder, this); } finally { FacilityMgr = null; } }
private void Binddropdwn() { IUser theLocationManager; theLocationManager = (IUser)ObjectFactory.CreateInstance("BusinessProcess.Security.BUser, BusinessProcess.Security"); DataTable theDT = theLocationManager.GetFacilityList(); BindFunctions theBindManger = new BindFunctions(); theBindManger.BindCombo(ddlfacilityname, theDT, "FacilityName", "FacilityId"); IQCareUtils util = new IQCareUtils(); DataTable theEntryDT = util.GetDataTable("MST_CODE", "EntryType"); theBindManger.BindCombo(ddlentrytype, theEntryDT, "Name", "Id"); }
protected void grdSearchResult_Sorting(object sender, GridViewSortEventArgs e) { IQCareUtils clsUtil = new IQCareUtils(); SortAndSetDataInGrid(e.SortExpression); if (ViewState["SortDirection"].ToString() == "Asc") { ViewState["SortDirection"] = "Desc"; } else { ViewState["SortDirection"] = "Asc"; } }
public void BindList() { IQCareUtils theUtils = new IQCareUtils(); BindFunctions theBind = new BindFunctions(); DataView theDV; theDV = new DataView((DataTable)Session["DrugData"]); DataTable theDT = theUtils.CreateTableFromDataView(theDV); if (theDT != null) { DataView theDV1 = new DataView(theDT); theDV1.Sort = "DrugName Asc"; theDT = theUtils.CreateTableFromDataView(theDV1); } if (theDT != null) { Session["DrugTable"] = theDT; theBind.BindList(lstDrugList, theDT, "DrugName", "drug_pk"); } DataSet thePharmacyDS = new DataSet(); IPediatric PediatricManager; PediatricManager = (IPediatric)ObjectFactory.CreateInstance("BusinessProcess.Pharmacy.BPediatric, BusinessProcess.Pharmacy"); thePharmacyDS = PediatricManager.GetPreDefinedDruglist(); if (thePharmacyDS.Tables[0].Rows.Count > 0) { Session["SelectedData"] = thePharmacyDS.Tables[0]; theBind.BindList(lstSelectedDrug, thePharmacyDS.Tables[0], "DrugName", "drug_pk"); DataTable theDT1 = (DataTable)Session["DrugTable"]; foreach (DataRow r in thePharmacyDS.Tables[0].Rows) { DataRow[] theDR1 = theDT1.Select("drug_pk=" + r[0].ToString()); if (theDR1.Length > 0) { theDT1.Rows.Remove(theDR1[0]); } } Session["DrugTable"] = theDT1; lstDrugList.Items.Clear(); theBind.BindList(lstDrugList, theDT1, "DrugName", "drug_pk"); } else { Session["SelectedData"] = CreateSelectedTable(); } }
private DataSet fillDataSet() { DataSet theDtSet; IQCareUtils clsUtil = new IQCareUtils(); FormManager = (IAppointment)ObjectFactory.CreateInstance("BusinessProcess.Scheduler.BAppointment, BusinessProcess.Scheduler"); IQCareUtils theUtil = new IQCareUtils(); theDtSet = new DataSet(); //******Selected value is pending and missed(All)*******// if ((ddAppointmentStatus.SelectedValue == "12") || (ddAppointmentStatus.SelectedValue == "13"))//******Selected value is pending or Missed*******// { if ((txtFrom.Text.Trim() == "") && (txtTo.Text.Trim() == "")) { if (ddAppointmentStatus.SelectedValue == "12") { theDtSet = FormManager.GetAppointmentGrid(1, Convert.ToDateTime(theUtil.MakeDate("01-01-1900")), Convert.ToDateTime(theUtil.MakeDate("01-01-1900")), Convert.ToInt32(Session["AppLocationId"])); } else { theDtSet = FormManager.GetAppointmentGrid(2, Convert.ToDateTime(theUtil.MakeDate("01-01-1900")), Convert.ToDateTime(theUtil.MakeDate("01-01-1900")), Convert.ToInt32(Session["AppLocationId"])); } } else { if (checkDate()) { if (ddAppointmentStatus.SelectedValue == "12") { theDtSet = FormManager.GetAppointmentGrid(1, Convert.ToDateTime(txtFrom.Text), Convert.ToDateTime(txtTo.Text), Convert.ToInt32(Session["AppLocationId"])); } else { theDtSet = FormManager.GetAppointmentGrid(2, Convert.ToDateTime(txtFrom.Text), Convert.ToDateTime(txtTo.Text), Convert.ToInt32(Session["AppLocationId"])); } } } } else { if (checkDate()) { theDtSet = FormManager.GetAppointmentGrid(3, Convert.ToDateTime(txtFrom.Text), Convert.ToDateTime(txtTo.Text), Convert.ToInt32(Session["AppLocationId"])); } } grdSearchResult.Columns.Clear(); grdSearchResult.DataSource = null; return(theDtSet); }
private void fillThePatientAppointmentDetails() { DataSet theDs; IAppointment FormManager; IQCareUtils theUtil = new IQCareUtils(); string selectValue1, selectValue2; FormManager = (IAppointment)ObjectFactory.CreateInstance("BusinessProcess.Scheduler.BAppointment, BusinessProcess.Scheduler"); //theDs = FormManager.GetPatientppointmentDetails(patientId, Convert.ToInt32(Request.QueryString["LocationID"]), Convert.ToInt32(Request.QueryString["PatientVisitID"])); theDs = FormManager.GetPatientppointmentDetails(patientId, Convert.ToInt32(Session["AppLocationId"]), Convert.ToInt32(Session["PatientVisitId"])); if (theDs.Tables[0].Rows.Count > 0) { if (theDs.Tables[0].Rows[0]["EmployeeId"].ToString() == "") { theDs.Tables[0].Rows[0]["EmployeeId"] = "0"; } txtAppDate.Text = String.Format("{0:dd-MMM-yyyy}", theDs.Tables[0].Rows[0]["AppDate"]); if (theDs.Tables[0].Rows[0]["AppReason"].ToString() == "") { ddAppPurpose.SelectedValue = "0"; selectValue1 = "0"; } else { ddAppPurpose.SelectedValue = theDs.Tables[0].Rows[0]["AppReason"].ToString(); selectValue1 = theDs.Tables[0].Rows[0]["AppReason"].ToString(); } if (theDs.Tables[0].Rows[0]["EmployeeId"].ToString() == "") { ddAppProvider.SelectedValue = "0"; selectValue2 = "0"; } else { ddAppProvider.SelectedValue = theDs.Tables[0].Rows[0]["EmployeeId"].ToString(); selectValue2 = theDs.Tables[0].Rows[0]["EmployeeId"].ToString(); } if ((ddAppPurpose.SelectedValue == "0") || (ddAppProvider.SelectedValue == "0")) { fillDropDownList(Convert.ToInt32(selectValue1), Convert.ToInt32(selectValue2)); ddAppPurpose.SelectedValue = selectValue1; ddAppProvider.SelectedValue = selectValue2; } } }
//{ // IAppointment FormManager; // BindFunctions appBind; // DataSet theDtSet; // DataSet theDtSetPurpose; // //*******Get the patient details on the basis of Patient Enrollment Id and show the details.*******// // FormManager = (IAppointment)ObjectFactory.CreateInstance("BusinessProcess.Scheduler.BAppointment, BusinessProcess.Scheduler"); // theDtSet = FormManager.GetAppointmentReasons(idPurpose); // appBind = new BindFunctions(); // appBind.BindCombo(ddAppPurpose, theDtSet.Tables[0], "Name", "Id"); // theDtSetPurpose = FormManager.GetEmployees(idEmployee); // appBind = new BindFunctions(); // appBind.BindCombo(ddAppProvider, theDtSetPurpose.Tables[0], "EmployeeName", "EmployeeId"); //} #endregion private void BindDropdownOrderBy(String EmployeeId) { IAppointment FormManager; FormManager = (IAppointment)ObjectFactory.CreateInstance("BusinessProcess.Scheduler.BAppointment, BusinessProcess.Scheduler"); DataSet theDtSet = FormManager.GetEmployees(0); IQCareUtils theUtils = new IQCareUtils(); DataView theDV = new DataView(theDtSet.Tables[0]); theDV.RowFilter = "DeleteFlag=0"; if (theDV.Table != null) { DataTable theDT = (DataTable)theUtils.CreateTableFromDataView(theDV); if (Convert.ToInt32(Session["AppUserEmployeeId"]) > 0) { string theModList = ""; foreach (DataRow theDR in theDT.Rows) { if (theModList == "") { theModList = theDR["EmployeeId"].ToString(); } else { theModList = theModList + "," + theDR["EmployeeId"].ToString(); } } theDV.RowFilter = "EmployeeId IN(" + Session["AppUserEmployeeId"].ToString() + "," + theModList + ")"; if (theDV.Count > 0) { theDT = theUtils.CreateTableFromDataView(theDV); } } BindFunctions BindManager = new BindFunctions(); //BindManager.BindCombo(ddAppProvider, theDT, "EmployeeName", "EmployeeId"); //BindUserDropdown(ddAppProvider, string.Empty); BindUserDropdown(ddAppProvider, Session["AppUserId"].ToString()); } }
private void Init_Form() { BindFunctions BindManager = new BindFunctions(); IQCareUtils theUtils = new IQCareUtils(); ILabFunctions LabResultManager = (ILabFunctions)ObjectFactory.CreateInstance("BusinessProcess.Laboratory.BLabFunctions, BusinessProcess.Laboratory"); DataSet theDSLabs; theDSLabs = LabResultManager.GetLabValues(); DataTable HivTestType = theDSLabs.Tables[2]; DataView theDV1 = new DataView(HivTestType); theDV1.RowFilter = "SubTestId in (53,114)"; HivTestType = theUtils.CreateTableFromDataView(theDV1); BindManager.BindCombo(DDHIVTestType, HivTestType, "SubTestName", "SubTestId"); DataSet theDSXML = new DataSet(); theDSXML.ReadXml(MapPath("..\\XMLFiles\\ALLMasters.con")); DataView theDV = new DataView(); DataTable theDT = new DataTable(); /*******/ theDV = new DataView(theDSXML.Tables["Mst_ModDeCode"]); theDV.RowFilter = "DeleteFlag=0 and CodeID=5"; if (theDV.Table != null) { theDT = (DataTable)theUtils.CreateTableFromDataView(theDV); BindManager.BindCombo(DDFinalResult, theDT, "Name", "ID"); theDV.Dispose(); theDT.Clear(); } theDV = new DataView(theDSXML.Tables["mst_PMTCTDecode"]); theDV.RowFilter = "DeleteFlag=0 and CodeID=5"; if (theDV.Table != null) { theDT = (DataTable)theUtils.CreateTableFromDataView(theDV); BindManager.BindCombo(DDResult, theDT, "Name", "ID"); theDV.Dispose(); theDT.Clear(); } theDV = new DataView(theDSXML.Tables["mst_PMTCTDecode"]); theDV.RowFilter = "DeleteFlag=0 and CodeID=4"; if (theDV.Table != null) { theDT = (DataTable)theUtils.CreateTableFromDataView(theDV); BindManager.BindCombo(DDInfantFeedingPractice, theDT, "Name", "ID"); theDV.Dispose(); theDT.Clear(); } }
private void BindDropDownReportedBy() { BindFunctions BindManager = new BindFunctions(); IQCareUtils theUtils = new IQCareUtils(); DataView theDV = new DataView(this.UserList); theDV.RowFilter = "EmployeeId Is Not Null Or EmployeeId > 0"; if (theDV.Table != null) { DataTable theDT = (DataTable)theUtils.CreateTableFromDataView(theDV); BindManager.BindCombo(ddlReportedbyName, theDT, "Name", "UserId", "", this.UserId.ToString()); } }
private void BindItemTypeDropdown() { IQCareUtils theUtils = new IQCareUtils(); ddlItemType.Items.Clear(); IMasterList objProgramlist = (IMasterList)ObjectFactory.CreateInstance("BusinessProcess.SCM.BMasterList,BusinessProcess.SCM"); DataTable theDT = objProgramlist.GetBillingGroups(); DataView theDV = new DataView(theDT); theDV.RowFilter = "DeleteFlag = 0"; BindFunctions theBind = new BindFunctions(); theBind.Win_BindCombo(ddlItemType, theDV.ToTable(), "Name", "BillingTypeID"); }
private void getCurrentDate() { IInitialEval IEManager; DataSet dr; IEManager = (IInitialEval)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BInitialEval, BusinessProcess.Clinical"); dr = IEManager.GetCurrentDate(); DateTime dt = Convert.ToDateTime(dr.Tables[0].Rows[0]["CurrentDay"]); IQCareUtils theUtil = new IQCareUtils(); dt = Convert.ToDateTime(dt.ToString(Session["AppDateFormat"].ToString())); currentDate = dt.ToString(Session["AppDateFormat"].ToString()); }
protected void btnPrescribeDrugs_Click(object sender, EventArgs e) { Session["PharmacyUCPatientVisitId"] = Session["PatientVisitId"]; if (ddlTreatmentplan.SelectedValue == "0") { Page.ClientScript.RegisterStartupScript(this.GetType(), "selectTreatmentPlan", "alert('Please select the treatment plan.');", true); } else { Hashtable HT = PharmacyHT(); ExpressFormManager.SaveUpdateARVTherapy(HT); IQCareUtils.Redirect("../Pharmacy/frmPharmacyform.aspx?opento=ArtForm&LastRegimenDispensed=True", "_blank", "toolbars=no,location=no,directories=no,dependent=yes,top=100,left=30,maximize=no,resize=no,width=1000,height=800,scrollbars=yes"); } }
/// <summary> /// Binds the combo. /// </summary> private void BindCombo() { Interface.Security.IUser UserManager; UserManager = (Interface.Security.IUser)ObjectFactory.CreateInstance("BusinessProcess.Security.BUser,BusinessProcess.Security"); DataTable theDT = UserManager.GetFacilityList(); BindFunctions theBind = new BindFunctions(); IQCareUtils theUtils = new IQCareUtils(); if (chkPref.Checked == true) { DataView theDV = new DataView(theDT); theDV.RowFilter = "Preferred = 1"; theDT = theDV.ToTable(); if (GblIQCare.pwd != null) { txtPassword.Text = GblIQCare.pwd.ToString(); GblIQCare.pwd = null; } } if (theDT.Rows.Count == 1) { ddLocation.DataSource = theDT; ddLocation.DisplayMember = "FacilityName"; ddLocation.ValueMember = "FacilityId"; ddLocation.DataSource = theDT; } //else if (chkPref.Checked == true) //{ // DataView theDV = new DataView(theDT); // theDV.RowFilter = "Preferred = 1"; // ddLocation.DataSource = theDV; // DataTable DT = new DataTable(); // DT = (DataTable)theUtils.CreateTableFromDataView(theDV); // theBind.Win_BindCombo(ddLocation, DT, "FacilityName", "FacilityId"); // if ( GblIQCare.pwd != null) // { // txtPassword.Text = GblIQCare.pwd.ToString() ; // GblIQCare.pwd = null; // } //} else { theBind.Win_BindCombo(ddLocation, theDT, "FacilityName", "FacilityId"); GblIQCare.pwd = null; } GblIQCare.pwd = null; }