Ejemplo n.º 1
0
        private void piHutangPicComboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (piHutangPicComboBox.SelectedIndex == -1)
            {
                return;
            }

            tPiHutangDataGridView.Rows.Clear();
            IList     piHutangList = DataMaster.GetListEqGreatThan(typeof(TPiHutang), TPiHutang.ColumnNames.PiHutangStatus, PiHutang.ToString(), TPiHutang.ColumnNames.PiHutangPic, piHutangPicComboBox.SelectedValue.ToString(), TPiHutang.ColumnNames.PiHutangSisa, decimal.Zero);
            TPiHutang piHut;

            for (int i = 0; i < piHutangList.Count; i++)
            {
                piHut = (TPiHutang)piHutangList[i];

                object[] piHutangDetail = new object[9];
                piHutangDetail[0] = false;
                piHutangDetail[1] = piHut.PiHutangDesc;
                piHutangDetail[2] = piHut.PiHutangJatuhTempo;
                piHutangDetail[3] = piHut.PiHutangJumlah;
                piHutangDetail[4] = piHut.PiHutangRetur;
                piHutangDetail[5] = piHut.PiHutangSisa;
                piHutangDetail[6] = string.Empty;
                piHutangDetail[7] = piHut.PiHutangId;
                piHutangDetail[8] = piHut.SubAccountId;

                tPiHutangDataGridView.Rows.Add(piHutangDetail);
            }
        }
Ejemplo n.º 2
0
        private void piHutangPicComboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (piHutangPicComboBox.SelectedIndex == -1)
            {
                return;
            }

            tPiHutangDataGridView.Rows.Clear();

            NHibernate.Expression.ICriterion[] expArrays = new NHibernate.Expression.ICriterion[3];
            expArrays[0] = NHibernate.Expression.Expression.Eq(TPiHutang.ColumnNames.PiHutangStatus, PiHutang.ToString());
            expArrays[1] = NHibernate.Expression.Expression.Eq(TPiHutang.ColumnNames.PiHutangPic, piHutangPicComboBox.SelectedValue.ToString());
            expArrays[2] = NHibernate.Expression.Expression.Gt(TPiHutang.ColumnNames.PiHutangSisa, decimal.Zero);


            NHibernate.Expression.Order[] orderArrays = new NHibernate.Expression.Order[1];
            orderArrays[0] = NHibernate.Expression.Order.Desc(TPiHutang.ColumnNames.TransactionId);

            IList piHutangList = DataMaster.GetList(typeof(TPiHutang), expArrays, orderArrays);

            //IList piHutangList = DataMaster.GetListEqGreatThan(typeof(TPiHutang), TPiHutang.ColumnNames.PiHutangStatus, PiHutang.ToString(), TPiHutang.ColumnNames.PiHutangPic, piHutangPicComboBox.SelectedValue.ToString(), TPiHutang.ColumnNames.PiHutangSisa, decimal.Zero);
            TPiHutang piHut;

            for (int i = 0; i < piHutangList.Count; i++)
            {
                piHut = (TPiHutang)piHutangList[i];

                object[] piHutangDetail = new object[9];
                piHutangDetail[0] = false;
                piHutangDetail[1] = piHut.PiHutangDesc;
                piHutangDetail[2] = piHut.PiHutangJatuhTempo;
                piHutangDetail[3] = piHut.PiHutangJumlah;
                piHutangDetail[4] = piHut.PiHutangRetur;
                piHutangDetail[5] = piHut.PiHutangSisa;
                piHutangDetail[6] = string.Empty;
                piHutangDetail[7] = piHut.PiHutangId;
                piHutangDetail[8] = piHut.SubAccountId;

                tPiHutangDataGridView.Rows.Add(piHutangDetail);
            }
        }