Exemplo n.º 1
0
        public void ShowList(itemMasterList list)
        {
            string sql = "SELECT [ITEMCODE],[ITEMNAME],[ITEMSORT],[ITEMPRICE],[ITEMSATUAN] FROM [standArtInvoicingDB].[dbo].[ITEM]";

            DataSet dataSet = DataProvider.GetDataSet(sql);

            //Create variable for dataset table
            DataTable itemTabel = dataSet.Tables[0];

            itemMaster nextItem = null;

            foreach (DataRow parentRow in itemTabel.Rows)
            {
                nextItem = new itemMaster();

                nextItem.Code   = parentRow["ITEMCODE"].ToString();
                nextItem.Name   = parentRow["ITEMNAME"].ToString();
                nextItem.Sort   = parentRow["ITEMSORT"].ToString();
                nextItem.Price  = Convert.ToDecimal(parentRow["ITEMPRICE"]);
                nextItem.Satuan = parentRow["ITEMSATUAN"].ToString();

                list.Add(nextItem);
            }
            dataSet.Dispose();
        }
Exemplo n.º 2
0
        private void FrmBarang_Load(object sender, EventArgs e)
        {
            //Initialize Controller
            m_AppController = new AppController();

            /* Note that the DataProvider class is static, so it doesn't
             * get instantiated. */

            //Get Group Harga List
            CommandGetItem getItem = new CommandGetItem();

            m_ItemList = (itemMasterList)m_AppController.ExecuteCommand(getItem);

            //Bind to datasource
            itemMasterBindingSource.DataSource = m_ItemList;
        }
Exemplo n.º 3
0
        public override object Execute()
        {
            itemMasterList list = new itemMasterList();

            return(list);
        }
Exemplo n.º 4
0
 public CommandDeleteItem(itemMasterList list, itemMaster deleteItem)
 {
     m_List = list;
     m_Item = deleteItem;
 }