private void FillGrid() { HPS.BLL.LaderTypeBLL.BLLLaderType_TFactory LaderTypeID_intFactory = new HPS.BLL.LaderTypeBLL.BLLLaderType_TFactory(); DataTable LaderTypeID_intDataTable = new DataTable(); string laderCondition = "[LaderType_T].[Active_bit]='true'"; LaderTypeID_intFactory.GetAllByCondition(laderCondition, ref LaderTypeID_intDataTable); laderTypeGrid.SetDataBinding(LaderTypeID_intDataTable, "LaderTypeID_intDataTable"); HPS.BLL.CompanyBLL.BLLCompany_TFactory CompanyID_intFactory = new HPS.BLL.CompanyBLL.BLLCompany_TFactory(); string CompanyCondition = "[Company_T].[Active_bit]='true'"; CompanyID_intFactory.GetAllByCondition(CompanyCondition, ref CompanyID_intDataTable); companyGrid.SetDataBinding(CompanyID_intDataTable, "CompanyID_intDataTable"); HPS.BLL.LadBillCreditBLL.BLLLadBillCredit_TFactory LadBillCreditFactory = new HPS.BLL.LadBillCreditBLL.BLLLadBillCredit_TFactory(); DataTable LadbillOrder1Table = new DataTable(); LadBillCreditFactory.SelectCompanyRemainedLadBillReportOrderColumns(LadbillOrder1Table); DataRow emptyRow1 = LadbillOrder1Table.NewRow(); LadbillOrder1Table.Rows.InsertAt(emptyRow1, 0); this.Order1ComboBox.DisplayMember = "PropertyValue"; this.Order1ComboBox.ValueMember = "ColumnName"; this.Order1ComboBox.DataSource = LadbillOrder1Table; this.Order1ComboBox.SelectedIndex = 0; DataTable LadbillOrder2Table = new DataTable(); LadBillCreditFactory.SelectCompanyRemainedLadBillReportOrderColumns(LadbillOrder2Table); DataRow emptyRow2 = LadbillOrder2Table.NewRow(); LadbillOrder2Table.Rows.InsertAt(emptyRow2, 0); this.Order2ComboBox.DisplayMember = "PropertyValue"; this.Order2ComboBox.ValueMember = "ColumnName"; this.Order2ComboBox.DataSource = LadbillOrder2Table; this.Order2ComboBox.SelectedIndex = 0; DataTable LadbillOrder3Table = new DataTable(); LadBillCreditFactory.SelectCompanyRemainedLadBillReportOrderColumns(LadbillOrder3Table); DataRow emptyRow3 = LadbillOrder3Table.NewRow(); LadbillOrder3Table.Rows.InsertAt(emptyRow3, 0); this.Order3ComboBox.DisplayMember = "PropertyValue"; this.Order3ComboBox.ValueMember = "ColumnName"; this.Order3ComboBox.DataSource = LadbillOrder3Table; this.Order3ComboBox.SelectedIndex = 0; DataTable LadbillOrder4Table = new DataTable(); LadBillCreditFactory.SelectCompanyRemainedLadBillReportOrderColumns(LadbillOrder4Table); DataRow emptyRow4 = LadbillOrder4Table.NewRow(); LadbillOrder4Table.Rows.InsertAt(emptyRow4, 0); this.Order4ComboBox.DisplayMember = "PropertyValue"; this.Order4ComboBox.ValueMember = "ColumnName"; this.Order4ComboBox.DataSource = LadbillOrder4Table; this.Order4ComboBox.SelectedIndex = 0; DataTable LadbillOrder5Table = new DataTable(); LadBillCreditFactory.SelectCompanyRemainedLadBillReportOrderColumns(LadbillOrder5Table); DataRow emptyRow5 = LadbillOrder5Table.NewRow(); LadbillOrder5Table.Rows.InsertAt(emptyRow5, 0); this.Order5ComboBox.DisplayMember = "PropertyValue"; this.Order5ComboBox.ValueMember = "ColumnName"; this.Order5ComboBox.DataSource = LadbillOrder5Table; this.Order5ComboBox.SelectedIndex = 0; HPS.BLL.GoodBLL.BLLGood_TFactory GoodFactory = new HPS.BLL.GoodBLL.BLLGood_TFactory(); DataTable GoodID_intDataTable = new DataTable(); GoodFactory.GetAll(ref GoodID_intDataTable); goodGrid.SetDataBinding(GoodID_intDataTable, "GoodID_intDataTable"); HPS.BLL.PortPlacesBLL.BLLPortPlaces_TFactory PortPlaceFactory = new HPS.BLL.PortPlacesBLL.BLLPortPlaces_TFactory(); DataTable PortPlaceID_intDataTable = new DataTable(); string PortPlacesCondition = "[PortPlaces_T].[Active_bit]='true'"; PortPlaceFactory.GetAllByCondition(PortPlacesCondition, ref PortPlaceID_intDataTable); portPlaceGrid.SetDataBinding(PortPlaceID_intDataTable, "PortPlaceID_intDataTable"); HPS.BLL.CityBLL.BLLCity_TFactory CityFactory = new HPS.BLL.CityBLL.BLLCity_TFactory(); DataTable DestinationCityID_intDataTable = new DataTable(); string CityCondition = "[City_T].[Active_bit]='true'"; CityFactory.GetAllByCondition(CityCondition, ref DestinationCityID_intDataTable); destinationCityGrid.SetDataBinding(DestinationCityID_intDataTable, "DestinationCityID_intDataTable"); this.FromDatefaDatePicker.SelectedDateTime = FarsiLibrary.Utils.PersianDateConverter.ToGregorianDateTime(CompanyID_intFactory.ServerJalaliDate); this.ToDatefaDatePicker.SelectedDateTime = FarsiLibrary.Utils.PersianDateConverter.ToGregorianDateTime(CompanyID_intFactory.ServerJalaliDate); //FromTimeTextBox.Text = "08:00:00"; // ToTimeTextBox.Text = CompanyID_intFactory.ServerTime; }