Ejemplo n.º 1
0
    public DataSet GetStorageListDataSource()
    {
        StorageList storage = new StorageList();
        System.Text.StringBuilder sql = new System.Text.StringBuilder();
        sql.Append(@"SELECT StorageNo,StorageDescription,GenerationTime FROM StorageList where 1=1 ");

        if (this.txt_StoNo.Text != string.Empty)
        {
            sql.Append(string.Format(" and StorageNo='{0}'", storage.DatabaseAccess.ConvertToDBString(this.txt_StoNo.Text)));
        }
        sql.Append(string.Format(" and convert(char(10),GenerationTime,102)>= '{0}' and convert(char(10),GenerationTime,102)<='{1}' ", this.StartDate.ToString("yyyy.MM.dd"), this.EndDate.ToString("yyyy.MM.dd")));
        sql.Append(" order by GenerationTime desc");
        return storage.GetDateSet(sql.ToString());
    }
Ejemplo n.º 2
0
    public DataSet GetStorageListDataSource()
    {
        StorageList storage = new StorageList();

        System.Text.StringBuilder sql = new System.Text.StringBuilder();
        sql.Append(@"SELECT StorageNo,StorageDescription,GenerationTime FROM StorageList where 1=1 ");

        if (this.txt_StoNo.Text != string.Empty)
        {
            sql.Append(string.Format(" and StorageNo='{0}'", storage.DatabaseAccess.ConvertToDBString(this.txt_StoNo.Text)));
        }
        sql.Append(string.Format(" and convert(char(10),GenerationTime,102)>= '{0}' and convert(char(10),GenerationTime,102)<='{1}' ", this.StartDate.ToString("yyyy.MM.dd"), this.EndDate.ToString("yyyy.MM.dd")));
        sql.Append(" order by GenerationTime desc");
        return(storage.GetDateSet(sql.ToString()));
    }