private void frmDerpartmentSetup_Load(object sender, EventArgs e)
 {
     objData = new C_Data_Batch();
     objData.OpenConnection("AzharPC-Home", ref strErr);
     frmLoad();
     objData.CloseConnection();
 }
 private void button3_Click(object sender, EventArgs e)
 {
     objData = new C_Data_Batch();
     objData.OpenConnection("AzharPC-Home", ref strErr);
     frmLoad();
     objData.CloseConnection();
 }
Beispiel #3
0
        private void lsttestname_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (isFirstTime != "0")
            {
                return;
            }
            var sql = "select Amount from Dbo_Services where service_id = " + lsttestname.SelectedValue;

            //C_Data_Batch objData;
            strErr  = "";
            objData = new C_Data_Batch();
            objData.OpenConnection("AzharPC-Office", ref strErr);

            var arrServicePrice = objData.RetriveData(sql, ref strErr);

            if (strErr == "")
            {
                if (arrServicePrice.Rows.Count > 0)
                {
                    lblServicePrice.Text = arrServicePrice.Rows[0][0].ToString();
                }
                else
                {
                    lblServicePrice.Text = "";
                }
            }
            else
            {
                lblServicePrice.Text = "";
            }

            objData.CloseConnection();
        }
        private void btnSave_Click(object sender, EventArgs e)
        {
            string strSql = "";

            hms.Include_Files.Utility.ComboboxItem Dept = cmbDepartment.SelectedItem as hms.Include_Files.Utility.ComboboxItem;

            if (Dept != null)
            {
                objData = new C_Data_Batch();
                objData.OpenConnection("AzharPC-Home", ref strErr);
                strSql = "Insert into dbo_Designation(DeptID, Designation) values (" + Dept.Value.ToString() + ", '" + txtDesigntionName.Text.ToString() + "')";
                objData.ExecuteQuery(strSql, ref strErr);

                if (strErr.ToString() != "")
                {
                    MessageBox.Show("Designation inserted");
                    frmLoad();
                }
                else
                {
                    MessageBox.Show("Designation not inserted");
                }

                objData.CloseConnection();
            }
            else
            {
                MessageBox.Show("Please Select the Department.");
            }
        }
        private void fillDesignation()
        {
            //throw new NotImplementedException();
            objetdata = new C_Data_Batch();
            string strErr = "";

            objetdata.OpenConnection("PolinPC-Office", ref strErr);
            string strSQL = "";

            hms.Include_Files.Utility.ComboboxItem itms = cmbDepartment.SelectedItem as hms.Include_Files.Utility.ComboboxItem;
            var DeptID = 0;

            if (itms != null)
            {
                DeptID = itms.Value;
                strSQL = "select DegId, Designation from dbo_Designation where DeptID= " + DeptID + " order by DeptID Desc ";
                DataTable arrDept = objetdata.RetriveData(strSQL, ref strErr);
                objetdata.CloseConnection();
                //DataSet ds = new DataSet();
                //ds.Tables.Add(arrDept);
                //dgvEmpprofile.DataSource = ds.Tables["Table1"];
                cmbDesignation.Items.Clear();
                if (arrDept.Rows.Count > 0)
                {
                    for (int i = 0; i < arrDept.Rows.Count; i++)
                    {
                        cmbDesignation.Items.Add(new hms.Include_Files.Utility.ComboboxItem(arrDept.Rows[i][1].ToString(), Convert.ToInt32(arrDept.Rows[i][0].ToString())));
                    }
                }
            }
            else
            {
                MessageBox.Show("Please select the Department");
            }
        }
Beispiel #6
0
 private void cmbInvestigation_SelectedIndexChanged(object sender, EventArgs e)
 {
     objData = new C_Data_Batch();
     objData.OpenConnection("AzharPC-Home", ref strErr);
     loadall();
     objData.CloseConnection();
 }
Beispiel #7
0
        private void addService()
        {
            if (lsttestname.SelectedIndex > -1)
            {
                var isVal = false;
                for (int i = 0; i < dgvInvestigation.Rows.Count; i++)
                {
                    if (dgvInvestigation.Rows[i].Cells[1].Value.ToString() == lsttestname.SelectedValue.ToString())
                    {
                        isVal = true;
                        break;
                    }
                }

                if (!isVal)
                {
                    objData = new C_Data_Batch();
                    objData.OpenConnection("AzharPC-Home", ref strErr);
                    string strSQL = "";
                    strSQL = "Select s.Service_ID,  s.Service_Name, s.Amount ,(case when Duraion_Type = 1 then dateadd(hh, Dutaion, getdate()) else dateadd(day,Dutaion, getdate() ) end ) 'Delivery Date' ,  '' Remarks from Dbo_Services S where service_id in (" + lsttestname.SelectedValue + ")";
                    DataTable arrservice = objData.RetriveData(strSQL, ref strErr);
                    dgvInvestigation.Rows.Add(false, arrservice.Rows[0][0].ToString(), arrservice.Rows[0][1].ToString(), arrservice.Rows[0][2].ToString(), arrservice.Rows[0][3].ToString(), arrservice.Rows[0][4].ToString());
                    dgvInvestigation.AutoResizeColumn(0, DataGridViewAutoSizeColumnMode.ColumnHeader);
                    getTotalCalculation();
                    objData.CloseConnection();
                }
            }
        }
Beispiel #8
0
 private void txtinvestigationid_KeyUp(object sender, KeyEventArgs e)
 {
     objData = new C_Data_Batch();
     objData.OpenConnection("AzharPC-Home", ref strErr);
     fillGridView();
     objData.CloseConnection();
 }
Beispiel #9
0
        private void btnpreview_Click(object sender, EventArgs e)
        {
            objData = new C_Data_Batch();
            string strErr = "";

            objData.OpenConnection("PolinPC-Office", ref strErr);
            //txtCategoryID
            string strSQL = "";

            strSQL = "select Category_ID, Category_Name from Dbo_Service_Category where Category_ID = 2 order by Category_ID Desc";
            DataTable arrCatList = objData.RetriveData(strSQL, ref strErr);

            objData.CloseConnection();
            DataSet ds = new DataSet();

            ds.Tables.Add(arrCatList);


            frmReport reportviewer = new frmReport();
            var       rptpath      = Utility.ReportPath + "rptCategory.rpt";

            reportviewer.ReportPath = rptpath;
            reportviewer.Reportds   = ds;
            reportviewer.Show(this);
        }
Beispiel #10
0
        private void getcategorid()
        {
            objData = new C_Data_Batch();
            string strErr = "";

            objData.OpenConnection("PolinPC-Office", ref strErr);
            //txtCategoryID
            string strSQL = "";

            strSQL = "select max(Category_ID) from Dbo_Service_Category";
            DataTable arrCatID = objData.RetriveData(strSQL, ref strErr);

            objData.CloseConnection();
            int CatId = 0;

            if (arrCatID.Rows.Count > 0)
            {
                if (arrCatID.Rows[0][0].ToString() == "")
                {
                    CatId = 1;
                }
                else
                {
                    CatId = Convert.ToInt32(arrCatID.Rows[0][0].ToString()) + 1;
                }
            }
            else
            {
                CatId = 1;
            }
            txtCategoryID.Text = CatId.ToString();
        }
Beispiel #11
0
        private void deleteData()
        {
            //throw new NotImplementedException();
            objData = new C_Data_Batch();
            string strErr = "";

            objData.OpenConnection("PolinPC-Office", ref strErr);
            //txtCategoryID
            string strSQL = "";

            strSQL = "Delete From  Dbo_Service_Category  where Category_ID = " + txtCategoryID.Text.ToString();
            objData.ExecuteQuery(strSQL, ref strErr);
            if (strErr != "")
            {
                MessageBox.Show("Data not Deleted.");
            }
            else
            {
                MessageBox.Show("Data Deleted Succefully Done.");
                getcategorid();
                clearCatName();
                grdShow();
            }
            objData.CloseConnection();
        }
Beispiel #12
0
        private void insertData()
        {
            //throw new NotImplementedException();
            objData = new C_Data_Batch();
            string strErr = "";

            objData.OpenConnection("PolinPC-Office", ref strErr);
            //txtCategoryID
            string strSQL = "";

            strSQL = "Insert into Dbo_Service_Category (Category_Name) values ('" + txtcategoryname.Text.ToString() + "')";
            objData.ExecuteQuery(strSQL, ref strErr);
            if (strErr != "")
            {
                MessageBox.Show("Data not Saved.");
            }
            else
            {
                MessageBox.Show("Data Save Succefully Done.");
                getcategorid();
                clearCatName();
                grdShow();
            }
            objData.CloseConnection();
        }
Beispiel #13
0
        private void getServiceID()
        {
            //throw new NotImplementedException();
            objData = new C_Data_Batch();
            string strErr = "";

            objData.OpenConnection("PolinPC-Office", ref strErr);
            //txtCategoryID
            string strSQL = "";

            strSQL = "select max(Service_ID) from Dbo_Services";
            DataTable arrID = objData.RetriveData(strSQL, ref strErr);

            objData.CloseConnection();
            int Id = 0;

            if (arrID.Rows.Count > 0)
            {
                if (arrID.Rows[0][0].ToString() == "")
                {
                    Id = 1;
                }
                else
                {
                    Id = Convert.ToInt32(arrID.Rows[0][0].ToString()) + 1;
                }
            }
            else
            {
                Id = 1;
            }
            txtServiceID.Text = Id.ToString();
        }
Beispiel #14
0
        private void btnpreview_Click(object sender, EventArgs e)
        {
            objData = new C_Data_Batch();
            string strErr = "";

            objData.OpenConnection("PolinPC-Office", ref strErr);
            //txtCategoryID
            string strSQL = "";

            strSQL = "SELECT [Service_ID],cat.Category_Name,[Service_Name],[Amount],[Commission],case when [Commision_Type] = 1 then '%' else 'Tk' end  'Commision Type',[Dutaion]	,case when [Duraion_Type] = 1 then 'Hour' else 'day' end 'Duraion Type'	,[CC_PC],[Sample_Type],[isSample] FROM [Dbo_Services] S Inner Join dbo_Service_category Cat On S.Category_ID = CAt.Category_ID order by Service_id Desc";
            DataTable arrCatList = objData.RetriveData(strSQL, ref strErr);

            objData.CloseConnection();
            DataSet ds = new DataSet();

            ds.Tables.Add(arrCatList);


            frmReport reportviewer = new frmReport();
            var       rptpath      = Utility.ReportPath + "rptServices.rpt";

            reportviewer.ReportPath = rptpath;
            reportviewer.Reportds   = ds;
            reportviewer.Show(this);
        }
Beispiel #15
0
 private void selectDoctorInfo()
 {
     objData = new C_Data_Batch();
     objData.OpenConnection("AzharPC-Home", ref strErr);
     loadDoctorInformation();
     objData.CloseConnection();
 }
Beispiel #16
0
 private void frmPathologylab_Load(object sender, EventArgs e)
 {
     objData = new C_Data_Batch();
     objData.OpenConnection("AzharPC-Home", ref strErr);
     frmLoad();
     objData.CloseConnection();
 }
Beispiel #17
0
 private void loaddoctor()
 {
     objData = new C_Data_Batch();
     objData.OpenConnection("AzharPC-Home", ref strErr);
     getDocList(txtdoctorinformation.Text.Trim());
     objData.CloseConnection();
 }
        private void btnsave_Click(object sender, EventArgs e)
        {
            //MessageBox.Show(dgvRetrurn.Rows[0].Cells[0].Value.ToString());
            //MessageBox.Show(dgvRetrurn.Rows[1].Cells[17].Value.ToString());
            objData = new C_Data_Batch();
            objData.OpenConnection("AzharPC-Home", ref strErr);
            string strSQL = "";

            objData.BeginTransaction(ref strErr);
            for (int i = 0; i < dgvRetrurn.Rows.Count - 1; i++)
            {
                if (Convert.ToInt16(dgvRetrurn.Rows[i].Cells[3].Value.ToString()) > 0)
                {
                    strSQL = "update dbo_InvertigationServiceItem set isreturn =1, return_on = getdate(), Return_Amount = " + dgvRetrurn.Rows[i].Cells[3].Value + ", ReturnUserID =" + Utility.userID + " , ReturnUserPC='" + Utility.PcName + "'  where ISI_ID=" + dgvRetrurn.Rows[i].Cells[17].Value;
                    objData.ExecuteQuery(strSQL, ref strErr);
                }
            }

            if (strErr == "")
            {
                string strSqlSpotCommission = "USP_Inv_Calculate_SpotCommission " + txtInvestigationID.Text.Split('/')[0] + "," + txtInvestigationID.Text.Split('/')[1] + "," + txtInvestigationID.Text.Split('/')[2];
                objData.ExecuteQuery(strSqlSpotCommission, ref strErr);
                MessageBox.Show("Investigation return succefully done.");
                objData.CommitTransaction(ref strErr);
            }
            else
            {
                MessageBox.Show("Investigation not return.");
                objData.Rollback(ref strErr);
            }
        }
Beispiel #19
0
 private void btnDocRefresh_Click(object sender, EventArgs e)
 {
     objData = new C_Data_Batch();
     objData.OpenConnection("AzharPC-Home", ref strErr);
     getDocList();
     objData.CloseConnection();
 }
        private void getEmployeeID()
        {
            //throw new NotImplementedException();
            string strErr = "";

            objetdata = new C_Data_Batch();
            string strSQL = "";

            strSQL = "select max(EmpID) from dbo_Employee_Profiles";
            objetdata.OpenConnection("PolinPC-Office", ref strErr);
            Int32     EmpID    = 0;
            DataTable arrEmpID = objetdata.RetriveData(strSQL, ref strErr);

            if (arrEmpID.Rows.Count > 0)
            {
                if (arrEmpID.Rows[0][0].ToString() != "")
                {
                    EmpID = Convert.ToInt32(arrEmpID.Rows[0][0].ToString()) + 1;
                }
                else
                {
                    EmpID = 1;
                }
            }
            else
            {
                EmpID = 1;
            }

            txtEmpployeeID.Text = EmpID.ToString();
        }
Beispiel #21
0
 private void lbPathlab_SelectedIndexChanged(object sender, EventArgs e)
 {
     objData = new C_Data_Batch();
     objData.OpenConnection("AzharPC-Home", ref strErr);
     fillGridView();
     objData.CloseConnection();
 }
        private void btnpreview_Click(object sender, EventArgs e)
        {
            objData = new C_Data_Batch();
            string strErr = "";

            objData.OpenConnection("PolinPC-Office", ref strErr);
            //txtCategoryID
            string strSQL = "";

            strSQL = "SELECT st.[SIT_ID],s.[Service_Name],st.[OGroup],st.[Entity],st.[Unit],st.[RefRenge],st.[Result_B]  FROM [Dbo_service_Itemwise_Test] ST inner Join Dbo_Services S On St.Service_ID=s.Service_ID order by st.[SIT_ID] desc";
            DataTable arrCatList = objData.RetriveData(strSQL, ref strErr);

            objData.CloseConnection();
            DataSet ds = new DataSet();

            ds.Tables.Add(arrCatList);


            frmReport reportviewer = new frmReport();
            var       rptpath      = Utility.ReportPath + "rptServicesWiseTest.rpt";

            reportviewer.ReportPath = rptpath;
            reportviewer.Reportds   = ds;
            reportviewer.Show(this);
        }
Beispiel #23
0
        private void InsertData()
        {
            objData = new C_Data_Batch();
            string strErr = "";

            objData.OpenConnection("PolinPC-Office", ref strErr);
            //txtCategoryID
            hms.Include_Files.Utility.ComboboxItem commissionType = cmbCommission.SelectedItem as hms.Include_Files.Utility.ComboboxItem;
            hms.Include_Files.Utility.ComboboxItem DurationType   = cmbDurationType.SelectedItem as hms.Include_Files.Utility.ComboboxItem;

            int isSample = 0;

            if (chkSample.Checked == true)
            {
                isSample = 1;
            }
            string strSQL = "";

            strSQL = "insert into [Dbo_Services] ([Category_ID],[Amount],[Commission],[Commision_Type],[Dutaion],[Duraion_Type],[CC_PC],[isSample],[Sample_Type], [Service_Name] ) ";
            strSQL = strSQL + "Values (" + txtcatagory.Text.ToString() + ", " + txtservicecharge.Text.ToString() + ", " + txtcommistion.Text.ToString() + ", " + commissionType.Value.ToString() + ", " + txtDuration.Text.ToString() + ", " + DurationType.Value.ToString();
            strSQL = strSQL + ", " + txtpc.Text.ToString() + ", " + isSample.ToString() + ", '" + txtSample.Text.ToString() + "', '" + txtservicename.Text.ToString() + "' )";
            //MessageBox.Show(strSQL);
            objData.ExecuteQuery(strSQL, ref strErr);
            if (strErr != "")
            {
                MessageBox.Show("Data not Inserted.");
            }
            else
            {
                MessageBox.Show("Data Inserted Succefully Done.");
                frmLoad();
            }
            objData.CloseConnection();
        }
 private void btnedit_Click(object sender, EventArgs e)
 {
     objData = new C_Data_Batch();
     objData.OpenConnection("AzharPC-Home", ref strErr);
     DataEdit();
     objData.CloseConnection();
 }
 private void frmServiceWiseList_Load(object sender, EventArgs e)
 {
     objData = new C_Data_Batch();
     objData.OpenConnection("AzharPC-Home", ref strErr);
     frmload();
     objData.CloseConnection();
 }
 private void btnnew_Click(object sender, EventArgs e)
 {
     objData = new C_Data_Batch();
     objData.OpenConnection("PolinPC-Office", ref strErr);
     frmload();
     objData.CloseConnection();
 }
Beispiel #27
0
        public int getDoctorId()
        {
            int    doctorid = 0;
            string strErr   = "";

            string strSQL = "select max(DocID) from dbo_Doctor_list";

            objData = new C_Data_Batch();
            objData.OpenConnection("PolinPC-Office", ref strErr);
            DataTable dtMaxDictorID = objData.RetriveData(strSQL, ref strErr);

            //string[,]  arrMaxDictorID = objData.RetriveDataArray(strSQL, ref strErr);
            objData.CloseConnection();
            if (dtMaxDictorID.Rows.Count > 0)
            {
                if (dtMaxDictorID.Rows[0][0].ToString() != "")
                {
                    doctorid = Convert.ToInt32(dtMaxDictorID.Rows[0][0].ToString()) + 1;
                }
                else
                {
                    doctorid = 1;
                }
            }
            else
            {
                doctorid = 1;
            }

            return(doctorid);
        }
Beispiel #28
0
        public bool SaveDoctorInfo(Doctor objDoctor)
        {
            string strErr = "";

            objData = new C_Data_Batch();
            objData.OpenConnection("PolinPC-Office", ref strErr);
            string sql = "Insert into dbo_Doctor_list(Title,DocID,Name,Degree,Doctype,Phone,IsPc,Address,Area,Specialist,MarketingBy)";

            sql = sql + " values('" + objDoctor.Title + "','" + objDoctor.DoctorId + "','" + objDoctor.DoctorName + "','" + objDoctor.Degree + "'";
            sql = sql + " ,'" + objDoctor.Doctype + "','" + objDoctor.Phone + "'," + objDoctor.IsPC + ",'" + objDoctor.Address + "'";
            sql = sql + " ,'" + objDoctor.Area + "','" + objDoctor.Specialist + "'," + objDoctor.MarketingBy + ")";

            objData.ExecuteQuery(sql, ref strErr);
            objData.CloseConnection();
            //objData = null;
            if (strErr == "")
            {
                MessageBox.Show("Succefully Insert into Doctor List");
                return(true);
            }
            else
            {
                return(false);
            }
        }
Beispiel #29
0
 private void frmInvestigationDueCollection_Load(object sender, EventArgs e)
 {
     objData = new C_Data_Batch();
     objData.OpenConnection("AzharPC-Home", ref strErr);
     frmlod();
     objData.CloseConnection();
 }
Beispiel #30
0
 private void btnsave_Click(object sender, EventArgs e)
 {
     strErr  = "";
     objData = new C_Data_Batch();
     objData.OpenConnection("AzharPC-Home", ref strErr);
     SaveData();
     objData.CloseConnection();
 }