Ejemplo n.º 1
0
        public static bool IsAc6(string costcentre)
        {
            string query  = string.Format("select count(*) from TB_DEPARTMENT where d_costcentre = '{0}' and d_ac6 = 'Yes'", costcentre);
            int    result = (int)DataServiceMaster.GetInstance().ExecuteScalar(query);

            return(result > 0 ? true : false);
        }
Ejemplo n.º 2
0
        public static string CostCentre()
        {
            string query = string.Format("select top 1 d_costcentre from TB_DEPARTMENT, TB_USER where u_name = N'{0}' and u_division = d_division and u_section = d_section", GlobalService.User);

            try
            {
                return(DataServiceMaster.GetInstance().ExecuteScalar(query).ToString().Trim());
            }
            catch
            {
                return("");
            }
        }
Ejemplo n.º 3
0
        public static string Department()
        {
            string query = string.Format("select u_department from TB_USER where u_name = N'{0}'", GlobalService.User);

            return(DataServiceMaster.GetInstance().ExecuteScalar(query).ToString().Trim());
        }
Ejemplo n.º 4
0
        public static string GetDepartmentHead(string department)
        {
            string query = string.Format("select d_incharge from TB_DEPARTMENT where d_dept = N'{0}' and d_division = '---'", department);

            return(DataServiceMaster.GetInstance().ExecuteScalar(query).ToString().Trim());
        }
Ejemplo n.º 5
0
        public static string GetSectionHead(string section)
        {
            string query = string.Format("select d_incharge from TB_DEPARTMENT where d_section = N'{0}'", section);

            return(DataServiceMaster.GetInstance().ExecuteScalar(query).ToString().Trim());
        }
Ejemplo n.º 6
0
        public static string GetDiv(string name)
        {
            string query = string.Format("select u_division from TB_USER where u_name = N'{0}'", name);

            return(DataServiceMaster.GetInstance().ExecuteScalar(query).ToString().Trim());
        }
Ejemplo n.º 7
0
        public static string GetHead(string staff)
        {
            string query = string.Format("select s_head from TB_C_STAFF where s_name = N'{0}'", staff.Trim());

            return(DataServiceMaster.GetInstance().ExecuteScalar(query).ToString());
        }