private void SetRights()
 {
     if (!GblIQCare.HasFunctionRight(ApplicationAccess.BudgetConfiguration, FunctionAccess.Delete, GblIQCare.dtUserRight))
     {
         dgwHolisticBudgetView.ReadOnly = true;
     }
 }
Пример #2
0
        private void btnSubmit_Click(object sender, EventArgs e)
        {
            if (rdoStockLedger.Checked)
            {
                ReportDocument objRptDoc = new ReportDocument();
                //IMasterList objStockLedger = (IMasterList)ObjectFactory.CreateInstance("BusinessProcess.SCM.BMasterList,BusinessProcess.SCM");
                ISCMReport objStockLedger = (ISCMReport)ObjectFactory.CreateInstance("BusinessProcess.SCM.BSCMReport,BusinessProcess.SCM");
                DataSet    theDS          = objStockLedger.GetStockLedgerData(Convert.ToInt32(ddlStore.SelectedValue), Convert.ToDateTime(dtpFrom.Text), Convert.ToDateTime(dtpTo.Text));
                theDS.WriteXmlSchema(GblIQCare.GetXMLPath() + "\\StockLedger.xml");
                rptStockLedger rep = new rptStockLedger();
                rep.SetDataSource(theDS);
                //  rep.ParameterFields["FormDate","1"];
                rep.SetParameterValue("FromDate", dtpFrom.Text);
                rep.SetParameterValue("ToDate", dtpTo.Text);
                rep.SetParameterValue("ToClosingDate", (Convert.ToString(dtpTo.Text)).Replace('-', ' '));
                rep.SetParameterValue("facilityname", GblIQCare.AppLocation);

                // , Convert.ToString(dtpFrom.Text)];

                frmReportViewer theRepViewer = new frmReportViewer();
                theRepViewer.MdiParent             = this.MdiParent;
                theRepViewer.Location              = new Point(0, 0);
                theRepViewer.crViewer.ReportSource = rep;
                theRepViewer.Show();
                this.Close();
            }
        }
        private void Init_Form()
        {
            string  XmlFile          = GblIQCare.GetXMLPath() + "Currency.xml";
            DataSet theDSCurrencyXML = new DataSet();

            theDSCurrencyXML.ReadXml(XmlFile);

            IBudgetConfigDetail objProgramlistByDonor = (IBudgetConfigDetail)ObjectFactory.CreateInstance("BusinessProcess.SCM.BBudgetConfigDetail,BusinessProcess.SCM");

            dsProgramListByDonor = objProgramlistByDonor.GetProgramListByDonor(Convert.ToInt32(GblIQCare.objHashtbl["DonorID"]));
            //if (dsProgramListByDonor.Tables[0].Select("Id = '" + GblIQCare.objHashtbl["ProgramID"] + "'").SingleOrDefault() != null)
            if (dsProgramListByDonor.Tables[0].Select("Id = '" + GblIQCare.objHashtbl["ProgramID"] + "'").Length > 0)
            {
                //DataRow []dr=dsProgramListByDonor.Tables[0].Select("Id = '" + GblIQCare.objHashtbl["ProgramID"] + "'");
                //foreach(DataRow drdt in dr)
                //{


                //}
                FundEndDt = Convert.ToDateTime(dsProgramListByDonor.Tables[0].Select("Id = '" + GblIQCare.objHashtbl["ProgramID"] + "' and FundingEndDate=max(FundingEndDate)").SingleOrDefault().ItemArray[10]);
                FundEndDt = Convert.ToDateTime(FundEndDt.Month + "-" + System.DateTime.DaysInMonth(FundEndDt.Year, FundEndDt.Month) + "-" + FundEndDt.Year);
                int month = Convert.ToInt32(dsProgramListByDonor.Tables[0].Select("Id = '" + GblIQCare.objHashtbl["ProgramID"] + "'  and FundingStartDate=min(FundingStartDate)").SingleOrDefault().ItemArray[4]);
                ProgramStartDt = Convert.ToDateTime(month + "-" + System.DateTime.DaysInMonth(Convert.ToInt32(GblIQCare.objHashtbl["ProgramYear"]), month) + "-" + GblIQCare.objHashtbl["ProgramYear"]);
            }

            string CurrencyCode = theDSCurrencyXML.Tables[0].Select("Id = '" + GblIQCare.AppCountryId + "'").SingleOrDefault().ItemArray[1].ToString().Split('(').LastOrDefault().Replace(")", "");

            lblCurrency.Text = "Currency: " + CurrencyCode;

            txtDonor.Text       = GblIQCare.objHashtbl["DonorName"].ToString();
            txtProgram.Text     = GblIQCare.objHashtbl["ProgramName"].ToString();
            txtProgramYear.Text = GblIQCare.objHashtbl["ProgramYear"].ToString();
            LoadGrid(LoadGridData().Tables[1]);
        }
Пример #4
0
        private void BindDropdown()
        {
            string  XmlFile          = GblIQCare.GetXMLPath() + "Currency.xml";
            DataSet theDSCurrencyXML = new DataSet();

            theDSCurrencyXML.ReadXml(XmlFile);

            string CurrencyCode = theDSCurrencyXML.Tables[0].Select("Id = '" + GblIQCare.AppCountryId + "'").SingleOrDefault().ItemArray[1].ToString().Split('(').LastOrDefault().Replace(")", "");

            lblCurrency.Text = "Currency: " + CurrencyCode;

            BindFunctions objBindControls = new BindFunctions();
            DataTable     theDT           = new DataTable();

            theDT = objBindControls.GetYears(DateTime.Now.AddYears(1).Year, "Name", "Id");
            ddlProgramYear.Items.Clear();
            objBindControls.Win_BindCombo(ddlProgramYear, theDT, "Name", "Id");

            ddlDonorPayer.DataSource = null;
            ddlDonorPayer.Items.Clear();
            objBindControls.Win_BindCombo(ddlDonorPayer, dsDonorList.Tables[0], "DonorName", "Id");

            ddlProgram.DataSource = null;
            ddlProgram.Items.Clear();
            objBindControls.Win_BindCombo(ddlProgram, dsProgramList.Tables[0], "ProgramName", "Id");
        }
Пример #5
0
        private void BindStoreName()
        {
            StoreID = GblIQCare.intStoreId;
            //ddlSourceStore.Enabled = true;
            BindFunctions theBind = new BindFunctions();
            DataSet       XMLDS   = new DataSet();

            XMLDS.ReadXml(GblIQCare.GetXMLPath() + "\\AllMasters.con");
            DataView  theDV;
            DataTable theStoreDT;

            IMasterList objItemCommonlist = (IMasterList)ObjectFactory.CreateInstance("BusinessProcess.SCM.BMasterList,BusinessProcess.SCM");
            IQCareUtils theUtils          = new IQCareUtils();
            DataSet     theDS             = objItemCommonlist.GetStoreDetail();


            ddlSourceStore.Enabled = true;
            theDV           = new DataView(theDS.Tables[2]);
            theDV.RowFilter = "Id <>" + StoreID;
            theStoreDT      = theDV.ToTable();

            theBind.Win_BindCombo(ddlSourceStore, theStoreDT, "Name", "Id");

            theDV           = new DataView(XMLDS.Tables["Mst_Store"]);
            theDV.RowFilter = "(DeleteFlag =0 or DeleteFlag is null) and  ( Id =" + StoreID + ")";
            theStoreDT      = theDV.ToTable();
            //theBind.Win_BindCombo(ddlDestinationStore, theStoreDT, "Name", "Id");
            ddlDestinationStore.DataSource    = theStoreDT;
            ddlDestinationStore.DisplayMember = "Name";
            ddlDestinationStore.ValueMember   = "Id";
        }
        /// <summary>
        /// Init_pages this instance.
        /// </summary>
        private void init_page()
        {
            IBilling BManager = (IBilling)ObjectFactory.CreateInstance("BusinessProcess.Billing.BBilling, BusinessProcess.Billing");

            this.rptDocument = new ReportDocument();
            DataSet theDataSet;

            theDataSet = BManager.GetInvoice(Convert.ToInt32(Request.QueryString["BillRefCode"]), Convert.ToInt32(Session["AppLocationId"]), this.PatientId);
            theDataSet.Tables[0].TableName = "Command_3";
            theDataSet.Tables[1].TableName = "Command_2";
            theDataSet.Tables[2].TableName = "Command_1";
            theDataSet.Tables[3].TableName = "Command";

            rptDocument.Load(MapPath("..\\Billing\\Reports\\rptInvoice.rpt"));


            rptDocument.SetDataSource(theDataSet);


            rptDocument.SetParameterValue("Currency", "KES");
            rptDocument.SetParameterValue("userName", Session["AppUserName"]);
            String facilityName = (String)theDataSet.Tables[1].Rows[0]["FacilityName"];

            rptDocument.SetParameterValue("FacilityName", facilityName);
            String facilityLogo = (String)theDataSet.Tables[1].Rows[0]["FacilityLogo"];

            rptDocument.SetParameterValue("PicturePath", GblIQCare.GetPath() + facilityLogo);


            billingRptViewer.EnableParameterPrompt    = false;
            billingRptViewer.ReportSource             = rptDocument;
            billingRptViewer.HasToggleGroupTreeButton = false;
            billingRptViewer.DataBind();
        }
 public void SetRights()
 {
     if (GblIQCare.HasFunctionRight(ApplicationAccess.Laboratory, FunctionAccess.Update, GblIQCare.dtUserRight) == false)
     {
         btsave.Enabled = false;
     }
 }
Пример #8
0
        public void SetRights()
        {
            //form level permission set

            if (GblIQCare.HasFunctionRight(ApplicationAccess.ManageForms, FunctionAccess.Add, GblIQCare.dtUserRight) == false)
            {
                btnAdd.Enabled = false;
            }
            if (GblIQCare.HasFunctionRight(ApplicationAccess.ManageForms, FunctionAccess.Update, GblIQCare.dtUserRight) == false)
            {
                btnEdit.Enabled = false;
            }
            if (GblIQCare.HasFunctionRight(ApplicationAccess.ManageForms, FunctionAccess.Delete, GblIQCare.dtUserRight) == false)
            {
                btnDelete.Enabled = false;
            }
            if (GblIQCare.HasFunctionRight(ApplicationAccess.SpecialFormLinking, FunctionAccess.Add, GblIQCare.dtUserRight) == false)
            {
                btnLnkServiceArea.Enabled = false;
            }
            if (GblIQCare.HasFunctionRight(ApplicationAccess.SpecialFormLinking, FunctionAccess.Update, GblIQCare.dtUserRight) == false)
            {
                btnLnkServiceArea.Enabled = false;
            }
            if (GblIQCare.HasFunctionRight(ApplicationAccess.SpecialFormLinking, FunctionAccess.View, GblIQCare.dtUserRight) == false)
            {
                btnLnkServiceArea.Enabled = false;
            }
        }
Пример #9
0
        private void frmPharmacynotes_Load(object sender, EventArgs e)
        {
            patientDetails();
            rptDocument = new ReportDocument();
            IQCareUtils theUtil       = new IQCareUtils();
            IDrug       ReportDetails = (IDrug)ObjectFactory.CreateInstance("BusinessProcess.Pharmacy.BDrug,BusinessProcess.Pharmacy");
            DataSet     theDS         = (DataSet)ReportDetails.GetPharmacyNotes(GblIQCare.patientID);

            theDS.WriteXmlSchema(GblIQCare.GetXMLPath() + "\\PharmacyNotes.xml");

            rptPharmacyNotes rep = new rptPharmacyNotes();

            rep.SetDataSource(theDS);
            //frmPharmacyNotes theRepViewer = new frmPharmacyNotes();
            frmReportViewer theRepViewer = new frmReportViewer();

            theRepViewer.MdiParent              = this.MdiParent;
            theRepViewer.Location               = new Point(0, 0);
            theRepViewer.crViewer.ReportSource  = rep;
            theRepViewer.crViewer.ToolPanelView = CrystalDecisions.Windows.Forms.ToolPanelViewType.None;
            theRepViewer.Width             = 902;
            theRepViewer.Height            = 650;
            theRepViewer.crViewer.Width    = 880;
            theRepViewer.crViewer.Height   = 600;
            theRepViewer.crViewer.Location = new Point(11, 11);
            theRepViewer.btnExit_position(451, 615);
            theRepViewer.Show();
            this.Close();
        }
        private byte[] getLogo(String facilityLogo)
        {
            // define the filestream object to read the image
            FileStream fs = default(FileStream);
            // define te binary reader to read the bytes of image
            BinaryReader br = default(BinaryReader);

            // check the existance of image
            if (File.Exists(GblIQCare.GetPath() + facilityLogo))
            {
                // open image in file stream
                fs = new FileStream(GblIQCare.GetPath() + facilityLogo, FileMode.Open);

                // initialise the binary reader from file streamobject
                br = new BinaryReader(fs);
                // define the byte array of filelength
                byte[] imgbyte = new byte[fs.Length + 1];
                // read the bytes from the binary reader
                imgbyte = br.ReadBytes(Convert.ToInt32((fs.Length)));

                br.Close();
                // close the binary reader
                fs.Close();
                // close the file stream
                return(imgbyte);
            }
            return(null);
        }
Пример #11
0
        /// <summary>
        /// This function is used when we double click on particular row/cell
        /// It will open the formbuilder form in edit mode.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void dgwFormDetails_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                if (GblIQCare.HasFunctionRight(ApplicationAccess.ManageForms, FunctionAccess.Update, GblIQCare.dtUserRight) == true)
                {
                    EnableControl();

                    if (e.ColumnIndex != -1 && e.RowIndex != -1)
                    {
                        strFormName   = "";
                        strFormNameDb = dgwFormDetails.Rows[e.RowIndex].Cells[0].Value.ToString();
                        strFormName   = strFormNameDb.Replace(" ", "_");
                        for (int i = 0; i < objDsFormDetails.Tables[0].Rows.Count; i++)
                        {
                            if (strFormNameDb == objDsFormDetails.Tables[0].Rows[i]["FormName"].ToString())
                            {
                                GblIQCare.iFormBuilderId = Convert.ToInt32(objDsFormDetails.Tables[0].Rows[i]["FormId"]);
                                strPublished             = objDsFormDetails.Tables[0].Rows[i][3].ToString();
                                break;
                            }
                        }
                    }
                    if (strPublished == "2")
                    {
                        DisableControl();
                    }
                    else
                    {
                        EnableControl();
                    }
                    for (int i = 0; i < objDsFormDetails.Tables[0].Rows.Count; i++)
                    {
                        if (strFormNameDb == objDsFormDetails.Tables[0].Rows[i]["FormName"].ToString())
                        {
                            if (objDsFormDetails.Tables[0].Rows[i]["Published"].ToString() == "2")
                            {
                                IQCareWindowMsgBox.ShowWindow("PMTCTPublishedForm", this);
                                return;
                            }
                            else
                            {
                                theForm           = (Form)Activator.CreateInstance(Type.GetType("IQCare.FormBuilder.frmFormBuilder, IQCare.FormBuilder"));
                                theForm.MdiParent = this.MdiParent;
                                theForm.Left      = 0;
                                theForm.Top       = 0;
                                theForm.Show();
                                this.Close();
                            }
                        }
                    }
                }
            }
            catch (Exception err)
            {
                MsgBuilder theBuilder = new MsgBuilder();
                theBuilder.DataElements["MessageText"] = err.Message.ToString();
                IQCareWindowMsgBox.ShowWindowConfirm("#C1", theBuilder, this);
            }
        }
Пример #12
0
        private void btnPrint_Click(object sender, EventArgs e)
        {
            ReportDocument objRptDoc            = new ReportDocument();
            DataSet        dsPrintPOItemsDetail = new DataSet();
            //IMasterList objStockLedger = (IMasterList)ObjectFactory.CreateInstance("BusinessProcess.SCM.BMasterList,BusinessProcess.SCM");
            IPurchase objPOItem = (IPurchase)ObjectFactory.CreateInstance("BusinessProcess.SCM.BPurchase,BusinessProcess.SCM");

            dsPrintPOItemsDetail = objPOItem.GetPurchaseOrderDetailsByPoid(GblIQCare.PurchaseOrderID);
            dsPrintPOItemsDetail.WriteXmlSchema(GblIQCare.GetXMLPath() + "\\IntStorePO.xml");
            rptIntStorePOReport rep = new rptIntStorePOReport();

            rep.SetDataSource(dsPrintPOItemsDetail);
            //  rep.ParameterFields["FormDate","1"];
            rep.SetParameterValue("ModePurchaseOrder", GblIQCare.ModePurchaseOrder);
            rep.SetParameterValue("facilityname", GblIQCare.AppLocation);

            // , Convert.ToString(dtpFrom.Text)];

            frmReportViewer theRepViewer = new frmReportViewer();

            theRepViewer.MdiParent             = this.MdiParent;
            theRepViewer.Location              = new Point(0, 0);
            theRepViewer.crViewer.ReportSource = rep;
            theRepViewer.Show();
            this.Close();
        }
Пример #13
0
        private DataTable getselectMultiselectvalues(string BindSource, string CodeID)
        {
            DataSet theDSXML = new DataSet();

            theDSXML.ReadXml(GblIQCare.GetXMLPath() + "\\AllMasters.con");
            DataView theDV = new DataView(theDSXML.Tables[BindSource]);

            if (BindSource.ToUpper() == "MST_SYMPTOM" || BindSource.ToUpper() == "MST_REASON")
            {
                theDV.RowFilter = "DeleteFlag=0 and SystemID IN(0," + GblIQCare.SystemId.ToString() + ") and CategoryID=" + CodeID + "";
            }
            else if (BindSource.ToUpper() == "MST_HIVDISEASE")
            {
                theDV.RowFilter = "DeleteFlag=0 and SystemID IN(0," + GblIQCare.SystemId.ToString() + ") and SectionID=" + CodeID + "";
            }
            else if (BindSource.ToUpper() == "MST_STOPPEDREASON")
            {
                theDV.RowFilter = "DeleteFlag=0 and SystemID IN(0," + GblIQCare.SystemId.ToString() + ")";
            }
            else if (BindSource.ToUpper() == "MST_DECODE" || BindSource.ToUpper() == "MST_PMTCTDECODE" || BindSource.ToUpper() == "MST_MODDECODE")
            {
                theDV.RowFilter = "DeleteFlag=0 and SystemID IN(0," + GblIQCare.SystemId.ToString() + ") and CodeID=" + CodeID + "";
            }
            else
            {
                theDV.RowFilter = "DeleteFlag=0";
            }

            IQCareUtils   theUtils    = new IQCareUtils();
            BindFunctions BindManager = new BindFunctions();
            DataTable     theDT       = (DataTable)theUtils.CreateTableFromDataView(theDV);

            return(theDT);
        }
Пример #14
0
        private void BindCombo()
        {
            DataSet XMLDS = new DataSet();

            XMLDS.ReadXml(GblIQCare.GetXMLPath() + "\\AllMasters.con");
            BindFunctions theBindManager = new BindFunctions();

            DataView theDV = new DataView(XMLDS.Tables["Mst_Store"]);

            theDV.RowFilter = "(DeleteFlag =0 or DeleteFlag is null)";
            theDV.Sort      = "Name ASC";
            DataTable theStoreDT = theDV.ToTable();

            theBindManager.Win_BindCombo(ddlStoreName, theStoreDT, "Name", "Id");

            theDV           = new DataView(XMLDS.Tables["Mst_Employee"]);
            theDV.RowFilter = "(DeleteFlag =0 or DeleteFlag is null)";
            DataTable theEMPPrepDT = theDV.ToTable();
            DataTable theEMPAuthDT = theDV.ToTable();

            theBindManager.Win_BindCombo(ddlPreparedBy, theEMPPrepDT, "Name", "Id");
            theBindManager.Win_BindCombo(ddlAuthoriseBy, theEMPAuthDT, "Name", "Id");
            theBindManager.Win_BindCombo(ddlAuthoriseBy, theEMPAuthDT, "Name", "Id");

            theDV           = new DataView(XMLDS.Tables["Mst_Decode"]);
            theDV.RowFilter = "CodeID=205 and (DeleteFlag =0 or DeleteFlag is null)";
            DataTable theAdjustmentReason = theDV.ToTable();

            theBindManager.Win_BindCombo(ddlAdjustmentReason, theAdjustmentReason, "Name", "Id");
        }
Пример #15
0
        public void BindGrid()
        {
            try
            {
                IManageForms objFormDetail;
                objFormDetail    = (IManageForms)ObjectFactory.CreateInstance("BusinessProcess.FormBuilder.BManageForms,BusinessProcess.FormBuilder");
                objDsFormDetails = objFormDetail.GetFormDetail(cmbFormStatus.SelectedIndex.ToString(), Convert.ToInt16(GblIQCare.AppCountryId));

                if (objDsFormDetails.Tables[0].Rows.Count > 0)
                {
                    ClearGrid();
                    string strGetPath = GblIQCare.GetPath();
                    imgPublished   = Image.FromFile(strGetPath + "\\Published1.bmp");
                    imgUnpublished = Image.FromFile(strGetPath + "\\Unpublished11.bmp");
                    imgInprocess   = Image.FromFile(strGetPath + "\\Inprocess11.bmp");
                    ShowGrid(objDsFormDetails.Tables[0]);
                }
                if (objDsFormDetails.Tables[1].Rows.Count > 0 && Convert.ToInt32(objDsFormDetails.Tables[1].Rows[0]["Exist"]) > 0)
                {
                    btnAdd.Enabled = false;
                }
            }
            catch (Exception err)
            {
                MsgBuilder theBuilder = new MsgBuilder();
                theBuilder.DataElements["MessageText"] = err.Message.ToString();
                IQCareWindowMsgBox.ShowWindowConfirm("#C1", theBuilder, this);
            }
        }
Пример #16
0
 public void SetRights()
 {
     //form level permission set
     if (GblIQCare.HasFunctionRight(ApplicationAccess.DonorProgramLinking, FunctionAccess.Add, GblIQCare.dtUserRight) == false)
     {
         btn_Save.Enabled = false;
     }
 }
Пример #17
0
 public void SetRights()
 {
     //Form level authentication
     if (GblIQCare.HasFunctionRight(ApplicationAccess.Store, FunctionAccess.Add, GblIQCare.dtUserRight) == false)
     {
         btnSave.Enabled = false;
     }
 }
Пример #18
0
 public void SetRights()
 {
     //form level permission set
     if (GblIQCare.HasFunctionRight(ApplicationAccess.Supplier, FunctionAccess.Add, GblIQCare.dtUserRight) == false)
     {
         btnSave.Enabled = false;
     }
 }
 private void SetRights()
 {
     if (!GblIQCare.HasFunctionRight(ApplicationAccess.PatientVisitConfiguration, FunctionAccess.Update, GblIQCare.dtUserRight))
     {
         buttonSave.Visible = false;
         dgwVisits.Columns["ColNumber"].ReadOnly = true;
     }
 }
Пример #20
0
 private void SetRights()
 {
     if (!GblIQCare.HasFunctionRight(ApplicationAccess.BudgetConfiguration, FunctionAccess.Update, GblIQCare.dtUserRight))
     {
         btnSave.Visible          = false;
         dgwBudgetConfig.ReadOnly = true;
     }
 }
Пример #21
0
 public void SetRights()
 {
     //form level permission set
     if (GblIQCare.HasFunctionRight(ApplicationAccess.StoreSourceDestinationLinking, FunctionAccess.Add, GblIQCare.dtUserRight) == false)
     {
         btnSave.Enabled = false;
     }
 }
Пример #22
0
        private void btnExport_Click(object sender, EventArgs e)
        {
            DataTable theDT = (DataTable)dgQResult.DataSource;

            if (theDT.Rows.Count > 0)
            {
                IQCareUtils theUtils = new IQCareUtils();
                theUtils.ExportToExcel_Windows(theDT, GblIQCare.GetExcelPath() + "QBReport.xls", GblIQCare.GetExcelPath() + "\\Templates\\BlankReport.xml");
            }
        }
Пример #23
0
 // private void btnAdd_Click(object sender, EventArgs e)
 //{
 //    GblIQCare.iHomePageId = 0;
 //    Form theForm = (Form)Activator.CreateInstance(Type.GetType("IQCare.FormBuilder.frm, IQCare.FormBuilder"));
 //    theForm.MdiParent = this.MdiParent;
 //    theForm.Left = 0;
 //    theForm.Top = 2;
 //    this.Close();
 //    theForm.Show();
 //}
 public void SetRights()
 {
     if (GblIQCare.HasFunctionRight(ApplicationAccess.ConfigureCareTermination, FunctionAccess.Add, GblIQCare.dtUserRight) == false)
     {
         btnAdd.Enabled = false;
     }
     if (GblIQCare.HasFunctionRight(ApplicationAccess.ConfigureCareTermination, FunctionAccess.Update, GblIQCare.dtUserRight) == false)
     {
         dgwFormDetails.Enabled = false;
     }
 }
Пример #24
0
    private DataSet GetDSPrintPrescription()
    {
        IDrug PediatricManager = (IDrug)ObjectFactory.CreateInstance("BusinessProcess.Pharmacy.BDrug, BusinessProcess.Pharmacy");
        //int PharmacyID = Convert.ToInt32(Session["PatientVisitId"]);
        int PharmacyID = Convert.ToInt32(Session["ptnPharmacyPK"]);
        int PatientID  = Convert.ToInt32(Session["PatientId"]);

        ViewState["PatientId"] = PatientID;

        DataSet theDS = PediatricManager.GetPharmacyPrescriptionDetails(PharmacyID, PatientID, 1);

        //Image Streaming
        DataTable dtFacility = new DataTable();
        // object of data row
        DataRow drow = null;

        // add the column in table to store the image of Byte array type
        dtFacility.Columns.Add("FacilityImage", System.Type.GetType("System.Byte[]"));
        drow = dtFacility.NewRow();
        // define the filestream object to read the image
        FileStream fs = default(FileStream);
        // define te binary reader to read the bytes of image
        BinaryReader br = default(BinaryReader);

        // check the existance of image
        if (File.Exists(GblIQCare.GetPath() + theDS.Tables[3].Rows[0]["FacilityLogo"].ToString()))
        {
            // open image in file stream
            fs = new FileStream(GblIQCare.GetPath() + theDS.Tables[3].Rows[0]["FacilityLogo"].ToString(), FileMode.Open);

            // initialise the binary reader from file streamobject
            br = new BinaryReader(fs);
            // define the byte array of filelength
            byte[] imgbyte = new byte[fs.Length + 1];
            // read the bytes from the binary reader
            imgbyte   = br.ReadBytes(Convert.ToInt32((fs.Length)));
            drow[0]   = imgbyte;
            ImageFlag = 1;
            // add the image in bytearray
            dtFacility.Rows.Add(drow);
            // add row into the datatable
            br.Close();
            // close the binary reader
            fs.Close();
            // close the file stream
        }

        theDS.Tables.Add(dtFacility);
        ////////////////////////////////////////

        theDS.WriteXmlSchema(Server.MapPath("..\\XMLFiles\\PatientPharmacyPrescription.xml"));
        PediatricManager = null;
        return(theDS);
    }
Пример #25
0
    //Stock Summary
    private DataSet StockSummary()
    {
        int      storeid  = Convert.ToInt32(Request.QueryString["storeid"]);
        int      itemid   = Convert.ToInt32(Request.QueryString["itemid"]);
        DateTime dateFrom = Convert.ToDateTime(theFromDate);
        DateTime dateTo   = Convert.ToDateTime(theToDate);
        DataSet  theDS    = GetBINCard(storeid, itemid, dateFrom, dateTo);

        ////////////////////////////////////////////////////////////////
        //Image Streaming
        DataTable dtFacility = new DataTable();
        // object of data row
        DataRow drow = null;

        // add the column in table to store the image of Byte array type
        dtFacility.Columns.Add("FacilityImage", System.Type.GetType("System.Byte[]"));
        drow = dtFacility.NewRow();
        // define the filestream object to read the image
        FileStream fs = default(FileStream);
        // define te binary reader to read the bytes of image
        BinaryReader br        = default(BinaryReader);
        int          ImageFlag = 0;

        // check the existance of image
        if (File.Exists(GblIQCare.GetPath() + theDS.Tables[3].Rows[0]["FacilityLogo"].ToString()))
        {
            // open image in file stream
            fs = new FileStream(GblIQCare.GetPath() + theDS.Tables[3].Rows[0]["FacilityLogo"].ToString(), FileMode.Open);

            // initialise the binary reader from file streamobject
            br = new BinaryReader(fs);
            // define the byte array of filelength
            byte[] imgbyte = new byte[fs.Length + 1];
            // read the bytes from the binary reader
            imgbyte = br.ReadBytes(Convert.ToInt32((fs.Length)));
            drow[0] = imgbyte;
            // add the image in bytearray
            dtFacility.Rows.Add(drow);
            ImageFlag = 1;
            // add row into the datatable
            br.Close();
            // close the binary reader
            fs.Close();
            // close the file stream
        }

        theDS.Tables.Add(dtFacility);
        return(theDS);
        //IPatientHome ReportDetails = (IPatientHome)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BPatientHome,BusinessProcess.Clinical");
        //DataSet dsPatientSummary = (DataSet)ReportDetails.GetPatientSummaryInformation(Convert.ToInt32(Session["PatientId"]), Convert.ToInt32(Session["TechnicalAreaId"]));
        //ReportDetails = null;
        //dsPatientSummary.WriteXmlSchema(Server.MapPath("..\\XMLFiles\\PatientClinicalSummary.xml"));
        //return dsPatientSummary;
    }
Пример #26
0
        private void BindGrid()
        {
              DataSet dsQueryIndicaterDetails = new DataSet();

            try
            {
                int intModuleID = 0;
                int intPublished = -1;
                string strPublished = "";

                if (cmbTechnicalArea1.SelectedIndex != 0)
                {
                    intModuleID = Convert.ToInt32(cmbTechnicalArea1.SelectedValue);
                }

                if (cmbFormStatus.SelectedIndex != -1)
                {
                    strPublished = cmbFormStatus.SelectedItem.ToString();
                }

                if (strPublished == "All")
                {
                    intPublished = -1;
                }
                else if (strPublished == "Published")
                {
                    intPublished = 2;
                }
                else if (strPublished == "Un-Published")
                {
                    intPublished = 1;
                }

                objTechArea = (IHomePageConfiguration)ObjectFactory.CreateInstance("BusinessProcess.FormBuilder.BHomePageConfiguration,BusinessProcess.FormBuilder");
                dsQueryIndicaterDetails = objTechArea.GetHomePageIndicatorQuery(intModuleID, intPublished);

                dgwFormDetails.DataSource = null;
                if (dsQueryIndicaterDetails.Tables[0].Rows.Count > 0)
                {

                    string strGetPath = GblIQCare.GetPath();

                    ShowGrid(dsQueryIndicaterDetails.Tables[0]);
                }
            }
            catch (Exception err)
            {

                MsgBuilder theBuilder = new MsgBuilder();
                theBuilder.DataElements["MessageText"] = err.Message.ToString();
                IQCareWindowMsgBox.ShowWindowConfirm("#C1", theBuilder, this);
            }

        }
        private void Init_Form()
        {
            string  XmlFile          = GblIQCare.GetXMLPath() + "Currency.xml";
            DataSet theDSCurrencyXML = new DataSet();

            theDSCurrencyXML.ReadXml(XmlFile);

            string CurrencyCode = theDSCurrencyXML.Tables[0].Select("Id = '" + GblIQCare.AppCountryId + "'").SingleOrDefault().ItemArray[1].ToString().Split('(').LastOrDefault().Replace(")", "");

            labelCurrency.Text = "Currency: " + CurrencyCode;
        }
Пример #28
0
 public void SetRights()
 {
     //form level permission set
     //if (GblIQCare.HasFunctionRight(ApplicationAccess.PatientRegistration, FunctionAccess.Add, GblIQCare.dtUserRight) == false)
     //{
     //    btnAdd.Enabled = false;
     //}
     if (GblIQCare.HasFunctionRight(ApplicationAccess.PatientRegistration, FunctionAccess.Update, GblIQCare.dtUserRight) == false)
     {
         btnEdit.Enabled = false;
     }
 }
Пример #29
0
        private void BindGrid()
        {
            //string filePath = "C:/AidsRelief Ver3.2/SourceBase/IQCare Management/XMLFiles/Masterlist.xml";
            //dsMasterList.ReadXml(filePath);
            DataSet dsMasterList = new DataSet();

            dsMasterList.ReadXml(GblIQCare.GetXMLPath() + "\\Masterlist.xml");
            if (dsMasterList.Tables[0].Rows.Count > 0)
            {
                ShowGrid(dsMasterList.Tables[0]);
            }
        }
Пример #30
0
 public void SetRights()
 {
     if (GblIQCare.HasFunctionRight(ApplicationAccess.FBImportExportForm, FunctionAccess.Add, GblIQCare.dtUserRight) == false)
     {
         btnExport.Enabled = false;
         btnImport.Enabled = false;
     }
     if (GblIQCare.HasFunctionRight(ApplicationAccess.FBImportExportForm, FunctionAccess.Update, GblIQCare.dtUserRight) == false)
     {
         btnExport.Enabled = false;
         btnImport.Enabled = false;
     }
 }