Esempio n. 1
0
    public DataSet GetMonthlyLeavetransactions()
    {
        string strSql = string.Empty;

        strSql = "select * from tbl_ApplicationData a,tbl_Status s,tbl_LeaveType l where a.ApplicationStatusId=s.StatusId and a.LeaveTypeId=l.LeaveTypeId ";
        if (!string.IsNullOrEmpty(_UserName))
        {
            strSql += " and a.UserName like '%" + _UserName + "%'";
        }
        if (!string.IsNullOrEmpty(_StartingMonth))
        {
            strSql += " and a.StartingDate >'" + _StartingMonth + "' ";
        }
        if (!string.IsNullOrEmpty(_EndingMonth))
        {
            strSql += " and a.StartingDate <'" + _EndingMonth + "' ";
        }
        if (!string.IsNullOrEmpty(_StartingDate))
        {
            strSql += " and a.StartingDate >'" + _StartingDate + "' ";
        }
        if (!string.IsNullOrEmpty(_EndingDate))
        {
            strSql += " and a.StartingDate <'" + _EndingDate + "' ";
        }
        if (Sort_On != "")
        {
            strSql = strSql + " ORDER BY " + Sort_On;
        }
        else
        {
            strSql = strSql + " Order By a.UserName";
        }
        DataSet dsTemp;

        dsTemp = SqlHelper.ExecuteDataset(ClsConnectionString.getConnectionString(), CommandType.Text, strSql);
        return(dsTemp);
    }
Esempio n. 2
0
    public void GetCountryDetails()
    {
        string strSql = string.Empty;

        strSql += "select c.CountryId,c.CountryName,c.CountryDescription,s.StatusName from tbl_Country c,tbl_Status s where c.StatusId=s.StatusId";
        strSql += " and c.CountryId=" + _CountryId;
        DataSet dsTemp;

        dsTemp = SqlHelper.ExecuteDataset(ClsConnectionString.getConnectionString(), CommandType.Text, strSql);
        DataRowCollection drc = dsTemp.Tables[0].Rows;

        if (drc.Count > 0)
        {
            _CountryName  = drc[0]["CountryName"].ToString();
            _CountryDescr = drc[0]["CountryDescription"].ToString();
            _StatusName   = drc[0]["StatusName"].ToString();
        }
        else
        {
            _CountryName  = "";
            _CountryDescr = "";
        }
    }
Esempio n. 3
0
    public DataSet GetDept()
    {
        string strSql = string.Empty;

        //strSql = "select c.DeptId,c.DeptName,c.DeptDescription,s.StatusName from tbl_Dept c,tbl_Status s where c.StatusId=s.StatusId";
        strSql += "select * from tbl_Dept where 1=1";
        if (_DeptName != "")
        {
            strSql += " and DeptName like '%" + _DeptName + "%'";
        }
        if (Sort_On != "")
        {
            strSql = strSql + " ORDER BY " + Sort_On;
        }
        else
        {
            strSql = strSql + " Order By DeptName";
        }
        DataSet dsTemp;

        dsTemp = SqlHelper.ExecuteDataset(ClsConnectionString.getConnectionString(), CommandType.Text, strSql);
        return(dsTemp);
    }
Esempio n. 4
0
    public void GetEmployeeDetails()
    {
        ///*
        //string strSql = string.Empty;
        //strSql += "select * from tbl_ClientDetails u,tbl_ClientLoginAccount ul, tbl_Status stat where u.StatusId=stat.StatusId and ul.ClientId=u.ClientId ";
        //strSql += " and u.ClientId=" + _UserId;

        SqlParameter[] p = new SqlParameter [1];
        p[0]       = new SqlParameter("@UserName", SqlDbType.VarChar);
        p[0].Value = _UserName;
        DataSet dsTemp;;

        dsTemp = SqlHelper.ExecuteDataset(ClsConnectionString.getConnectionString(), CommandType.StoredProcedure, "spGetEmpDetails", p);
        DataRowCollection drc = dsTemp.Tables[0].Rows;

        if (drc.Count > 0)
        {
            _UserName    = drc[0]["UserName"].ToString();
            _EmpName     = drc[0]["EmpName"].ToString();
            _Designation = drc[0]["EmpDesigName"].ToString();
            _ContactNo   = drc[0]["ContactNo"].ToString();
            _Address     = drc[0]["Address"].ToString();
            _EmailId     = drc[0]["EmailId"].ToString();
            _CityId      = Convert.ToInt32(drc[0]["CityId"].ToString());
            _StateId     = Convert.ToInt32(drc[0]["StateId"].ToString());
            _CountryId   = Convert.ToInt32(drc[0]["CountryId"].ToString());
            _DeptId      = Convert.ToInt32(drc[0]["DeptId"].ToString());
        }
        else
        {
            _EmpName   = "";
            _ContactNo = "";
            _Address   = "";
            _EmailId   = "";
        }
    }
Esempio n. 5
0
 public DataSet GetLeaveType()
 {
     return(SqlHelper.ExecuteDataset(ClsConnectionString.getConnectionString(), CommandType.StoredProcedure, "spGetLeaveType"));
 }
Esempio n. 6
0
 public DataSet GetNextDayEmpList()
 {
     return(SqlHelper.ExecuteDataset(ClsConnectionString.getConnectionString(), CommandType.Text, "spGetNextDayEmpList"));
 }