Click here to Skip to main content
15,894,330 members

Comments by Member 13338075 (Top 9 by date)

Member 13338075 4-Jun-18 5:28am View    
In my Employee class I wrote like this
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Threading.Tasks;
using System.Data.Sql;
using System.Data.SqlClient;
using DataAccess;

namespace Employee.class
{
    class Employee
    {
        DataOperation DataProcessor = new DataOperation();

        private static Employee objEmployee = null;
        const string SP_Get_Employee= "Get_Employee";


        private Employee()
        { }

        public static Township GetEmployee()
        {
            if (Employee.objEmployee == null) return Employee.objEmloyee = new Employee();
            else return Employee.objEmployee;
        }

        public DataTable GetAllEmployee()
        {
            DataTable dt = this.DataProcessor.GetDataTable(Employee.SP_Get_Employee);
            return dt;
        }

    }
}


How can I bind the data to combobox?
Member 13338075 4-Jun-18 4:11am View    
In my Employee class I wrote the code
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Threading.Tasks;
using System.Data.Sql;
using System.Data.SqlClient;
using DataAccess;

namespace Employee.class
{
    class Employee
    {
        DataOperation DataProcessor = new DataOperation();

        private static Employee objEmployee = null;
        const string SP_Get_Employee= "Get_Employee";


        private Employee()
        { }

        public static Township GetEmployee()
        {
            if (Employee.objEmployee == null) return Employee.objEmloyee = new Employee();
            else return Employee.objEmployee;
        }

        public DataTable GetAllEmployee()
        {
            DataTable dt = this.DataProcessor.GetDataTable(Employee.SP_Get_Employee);
            return dt;
        }

    }
}


Member 13338075 4-Jun-18 4:09am View    
Deleted
In my Employee class I wrote the code
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Data;using System.Threading.Tasks;using System.Data.Sql;using System.Data.SqlClient;using DataAccess;namespace Employee.class{    class Employee    {        DataOperation DataProcessor = new DataOperation();        private static Employee objEmployee = null;        const string SP_Get_Employee= "Get_Employee";        private Employee()        { }        public static Township GetEmployee()        {            if (Employee.objEmployee == null) return Employee.objEmloyee = new Employee();            else return Employee.objEmployee;        }        public DataTable GetAllEmployee()        {            DataTable dt = this.DataProcessor.GetDataTable(Employee.SP_Get_Employee);            return dt;        }    }}


How can I connect to the combobox to bind the data?
Member 13338075 10-Jan-18 22:21pm View    
Now I have the solution. The error is occured because the datbase is not in good condition. So, I repair the database and the error is cleared.
Member 13338075 3-Jan-18 3:48am View    
Yes, I ran this query and the error occur in the message box.
"The database cannot be recovered because the log was not restored."