public DataSet GetSimpleEmployees()
        {
            EntityConfig config = ConfigManagent.Configs["hr.employee.exportSimplePersons"];

            BlueFramework.Data.Database database = new BlueFramework.Data.DatabaseProviderFactory().CreateDefault();
            string  sql = config.Sql;
            DataSet ds  = database.ExecuteDataSet(CommandType.Text, sql);

            return(ds);
        }
        public DataSet ExportDetail(string payMonth)
        {
            payMonth = DateTime.Parse(payMonth).ToString("yyyy-MM-dd");
            string filePath = System.AppDomain.CurrentDomain.BaseDirectory + "/Setting/sql/hr.sql.xml";
            string sql      = BlueFramework.Common.XmlUtils.GetInnerText(filePath, "hr.paydetail");

            BlueFramework.Data.DatabaseProviderFactory factory = new BlueFramework.Data.DatabaseProviderFactory();
            BlueFramework.Data.Database db = factory.CreateDefault();
            DbCommand command = db.GetSqlStringCommand(sql);

            db.AddInParameter(command, "payMonth", DbType.String, payMonth);
            DataSet ds = db.ExecuteDataSet(command);

            return(ds);
        }
Exemple #3
0
        public DataSet GetWxyjByYear(int year)
        {
            string filePath = System.AppDomain.CurrentDomain.BaseDirectory + "/Setting/sql/hr.sql.xml";
            string sql      = BlueFramework.Common.XmlUtils.GetInnerText(filePath, "hr.WxyjYear");

            BlueFramework.Data.DatabaseProviderFactory factory = new BlueFramework.Data.DatabaseProviderFactory();
            BlueFramework.Data.Database db = factory.CreateDefault();
            DbCommand command = db.GetSqlStringCommand(sql);

            db.AddInParameter(command, "payYear", DbType.String, year.ToString());
            //DataTable dt = db.ExecuteDataSet(command).Tables[0];
            DataSet   ds = db.ExecuteDataSet(command);
            DataTable dt = ds.Tables[0];

            FillRowNum(ds);
            SumDataSet(ds);
            return(ds);
        }
        public DataSet ExportBankPayment(string payMonth)
        {
            payMonth = DateTime.Parse(payMonth).ToString("yyyy-MM-dd");
            string filePath = System.AppDomain.CurrentDomain.BaseDirectory + "/Setting/sql/hr.sql.xml";
            string sql      = BlueFramework.Common.XmlUtils.GetInnerText(filePath, "hr.payBank");

            BlueFramework.Data.DatabaseProviderFactory factory = new BlueFramework.Data.DatabaseProviderFactory();
            BlueFramework.Data.Database db = factory.CreateDefault();
            DbCommand command = db.GetSqlStringCommand(sql);

            db.AddInParameter(command, "payMonth", DbType.String, payMonth);
            //DataTable dt = db.ExecuteDataSet(command).Tables[0];
            DataSet   ds = db.ExecuteDataSet(command);
            DataTable dt = ds.Tables[0];

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                dt.Rows[i][0] = i + 1;
            }
            return(ds);
        }