Ejemplo n.º 1
0
        private List<PrintItemDetail> getQueryResult(SqlCommand cmd)
        {
            DbDataReader reader = cmd.ExecuteReader();
            DataTable dt = new DataTable();

            List<PrintItemDetail> items = new List<PrintItemDetail>();
            PrintItemDetail item = null;

            dt.Load(reader);
            reader.Close();

            if (dt.Rows.Count > 0)
            {
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    item = new PrintItemDetail();
                    item.category = getString(dt.Rows[i]["category"]);
                    item.code_desc = getString(dt.Rows[i]["code_desc"]);
                    item.jid = getInt(dt.Rows[i]["jid"]);
                    item.ordering = "" + getInt(dt.Rows[i]["ordering"]);
                    item.category_name = getString(dt.Rows[i]["category_name"]);
                    items.Add(item);
                }
            }
            return items;
        }
Ejemplo n.º 2
0
        public static String getJobLookupItemsJson(PrintItemDetail lookup)
        {

            StringBuilder JobLookupItemJson = new StringBuilder();
            JobLookupItemJson.Append("{xtype:'checkbox',boxLabel:'").Append(lookup.code_desc).Append("',name:'item").Append(lookup.jid).Append("'}");
            return JobLookupItemJson.ToString();
        }