Exemple #1
0
        private void DeleteButton_Click(object sender, EventArgs e)
        {
            HPS.BLL.CompanyBLL.BLLCompany_TFactory CompanyFactory = new HPS.BLL.CompanyBLL.BLLCompany_TFactory();

            try
            {
                if (Hepsa.Core.Common.MessageBox.ConfirmDeleteMessage() == false)
                {
                    return;
                }


                HPS.BLL.CompanyBLL.BLLCompany_TFactory Company_TFactory = new HPS.BLL.CompanyBLL.BLLCompany_TFactory();
                HPS.BLL.CompanyBLL.BLLCompany_TKeys    CompanyKey       = new HPS.BLL.CompanyBLL.BLLCompany_TKeys();

                CompanyKey.CompanyID_int = (Int32)CompanyGridView.CurrentRow.Cells["colCompanyID_int"].Value;
                CompanyFactory.Delete(CompanyKey);

                DataRow[] dr = ((DataTable)this.CompanyGridView.DataSource).Select(HPS.BLL.CompanyBLL.BLLCompany_T.Company_TField.CompanyID_int.ToString() + "='" + CompanyKey.CompanyID_int.ToString() + "'");
                if (dr.Length > 0)
                {
                    dr[0].Delete();
                }
                ((DataTable)this.CompanyGridView.DataSource).AcceptChanges();
            }

            catch (Exception ex)
            {
                Hepsa.Core.Common.MessageBox.ErrorMessage(ex.Message);
            }
        }
Exemple #2
0
        protected override void Delete()
        {
            HPS.BLL.CompanyBLL.BLLCompany_TFactory CompanyFactory = new HPS.BLL.CompanyBLL.BLLCompany_TFactory();

            try
            {
                if (Hepsa.Core.Common.MessageBox.ConfirmMessage(HPS.Exceptions.ExceptionCs.DeleteMessage) == true)
                {
                    CompanyFactory.BeginProc();
                    CompanyFactory.Delete((HPS.BLL.CompanyBLL.BLLCompany_TKeys)Key);
                    CompanyFactory.CommitProc();
                    if (DataTable != null)
                    {
                        DataRow[] dr = DataTable.Select(HPS.BLL.CompanyBLL.BLLCompany_T.Company_TField.CompanyID_int.ToString() + "='" + ((HPS.BLL.CompanyBLL.BLLCompany_TKeys)Key).CompanyID_int.ToString() + "'");
                        if (dr.Length > 0)
                        {
                            dr[0].Delete();
                        }
                        DataTable.AcceptChanges();
                    }
                    this.Close();
                }
            }
            catch (Exception ex)
            {
                CompanyFactory.RollBackProc();
                throw ex;
            }
        }
Exemple #3
0
 protected override void Edit()
 {
     HPS.BLL.CompanyBLL.BLLCompany_TFactory CompanyFactory = new HPS.BLL.CompanyBLL.BLLCompany_TFactory();
     try
     {
         HPS.BLL.CompanyBLL.BLLCompany_T CompanyEntity = new HPS.BLL.CompanyBLL.BLLCompany_T();
         CompanyEntity.CompanyCode_nvc       = Hepsa.Core.Common.PersentationController.GetEntityValue(CompanyCode_nvcTextBox.Text, TypeCode.String).ToString();
         CompanyEntity.Company_nvc           = Hepsa.Core.Common.PersentationController.GetEntityValue(Company_nvcTextBox.Text, TypeCode.String).ToString();
         CompanyEntity.DirectorName_nvc      = Hepsa.Core.Common.PersentationController.GetEntityValue(DirectorName_nvcTextBox.Text, TypeCode.String).ToString();
         CompanyEntity.DirectorMobile_nvc    = Hepsa.Core.Common.PersentationController.GetEntityValue(DirectorMobile_nvcTextBox.Text, TypeCode.String).ToString();
         CompanyEntity.Phone_nvc             = Hepsa.Core.Common.PersentationController.GetEntityValue(Phone_nvcTextBox.Text, TypeCode.String).ToString();
         CompanyEntity.Fax_nvc               = Hepsa.Core.Common.PersentationController.GetEntityValue(Fax_nvcTextBox.Text, TypeCode.String).ToString();
         CompanyEntity.Email_nvc             = Hepsa.Core.Common.PersentationController.GetEntityValue(Email_nvcTextBox.Text, TypeCode.String).ToString();
         CompanyEntity.WebAddress_nvc        = Hepsa.Core.Common.PersentationController.GetEntityValue(WebAddress_nvcTextBox.Text, TypeCode.String).ToString();
         CompanyEntity.Active_bit            = Active_bitCheckBox.Checked;
         CompanyEntity.InfractionGroupID_int = (Nullable <Int32>)Hepsa.Core.Common.PersentationController.GetEntityValue(InfractionGroupID_intComboBox.SelectedValue, TypeCode.Int32);
         CompanyEntity.Address_nvc           = Hepsa.Core.Common.PersentationController.GetEntityValue(Address_nvcTextBox.Text, TypeCode.String).ToString();
         CompanyEntity.CityID_int            = (Nullable <Int32>)Hepsa.Core.Common.PersentationController.GetEntityValue(CityID_intComboBox.SelectedValue, TypeCode.Int32);
         CompanyEntity.CityCode_nvc          = Convert.ToString(Hepsa.Core.Common.PersentationController.GetEntityValue(CityEntity.CityCode_nvc, TypeCode.String));
         CompanyEntity.GroupID_int           = (Int32?)Hepsa.Core.Common.PersentationController.GetEntityValue(CompanyGroupComboBox.SelectedValue, TypeCode.Int32);
         if (Hepsa.Core.Common.MessageBox.ConfirmMessage(HPS.Exceptions.ExceptionCs.EditMessage) == true)
         {
             CompanyFactory.BeginProc();
             CompanyFactory.Update(CompanyEntity, (HPS.BLL.CompanyBLL.BLLCompany_TKeys)Key);
             CompanyFactory.CommitProc();
             if (DataTable != null)
             {
                 DataRow[] dr = DataTable.Select(HPS.BLL.CompanyBLL.BLLCompany_T.Company_TField.CompanyID_int.ToString() + "='" + ((HPS.BLL.CompanyBLL.BLLCompany_TKeys)Key).CompanyID_int.ToString() + "'");
                 if (dr.Length > 0)
                 {
                     dr[0][HPS.BLL.CompanyBLL.BLLCompany_T.Company_TField.CompanyCode_nvc.ToString()]    = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(CompanyEntity.CompanyCode_nvc, TypeCode.String);
                     dr[0][HPS.BLL.CompanyBLL.BLLCompany_T.Company_TField.Company_nvc.ToString()]        = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(CompanyEntity.Company_nvc, TypeCode.String);
                     dr[0][HPS.BLL.CompanyBLL.BLLCompany_T.Company_TField.DirectorName_nvc.ToString()]   = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(CompanyEntity.DirectorName_nvc, TypeCode.String);
                     dr[0][HPS.BLL.CompanyBLL.BLLCompany_T.Company_TField.DirectorMobile_nvc.ToString()] = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(CompanyEntity.DirectorMobile_nvc, TypeCode.String);
                     dr[0][HPS.BLL.CompanyBLL.BLLCompany_T.Company_TField.Phone_nvc.ToString()]          = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(CompanyEntity.Phone_nvc, TypeCode.String);
                     dr[0][HPS.BLL.CompanyBLL.BLLCompany_T.Company_TField.Fax_nvc.ToString()]            = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(CompanyEntity.Fax_nvc, TypeCode.String);
                     dr[0][HPS.BLL.CompanyBLL.BLLCompany_T.Company_TField.Email_nvc.ToString()]          = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(CompanyEntity.Email_nvc, TypeCode.String);
                     dr[0][HPS.BLL.CompanyBLL.BLLCompany_T.Company_TField.WebAddress_nvc.ToString()]     = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(CompanyEntity.WebAddress_nvc, TypeCode.String);
                     dr[0][HPS.BLL.CompanyBLL.BLLCompany_T.Company_TField.Active_bit.ToString()]         = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(CompanyEntity.Active_bit, TypeCode.Boolean);
                     dr[0]["InfractionGroupID_intInfractionGroup_nvc"] = Hepsa.Core.Common.PersentationController.GetComboBoxDisplayMember(InfractionGroupID_intComboBox);
                     dr[0][HPS.BLL.CompanyBLL.BLLCompany_T.Company_TField.Address_nvc.ToString()] = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(CompanyEntity.Address_nvc, TypeCode.String);
                     dr[0]["CityID_intCity_nvc"] = Hepsa.Core.Common.PersentationController.GetComboBoxDisplayMember(CityID_intComboBox);
                     dr[0][HPS.BLL.CompanyBLL.BLLCompany_T.Company_TField.CityCode_nvc.ToString()] = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(CompanyEntity.CityCode_nvc, TypeCode.String);
                     dr[0]["GroupName_nvc"] = Hepsa.Core.Common.PersentationController.GetComboBoxDisplayMember(CompanyGroupComboBox);
                 }
                 DataTable.AcceptChanges();
             }
         }
     }
     catch (Exception ex)
     {
         CompanyFactory.RollBackProc();
         throw ex;
     }
 }
Exemple #4
0
 protected override void Insert()
 {
     HPS.BLL.CompanyBLL.BLLCompany_TFactory CompanyFactory = new HPS.BLL.CompanyBLL.BLLCompany_TFactory();
     try
     {
         HPS.BLL.CompanyBLL.BLLCompany_T CompanyEntity = new HPS.BLL.CompanyBLL.BLLCompany_T();
         CompanyEntity.CompanyCode_nvc       = Hepsa.Core.Common.PersentationController.GetEntityValue(CompanyCode_nvcTextBox.Text, TypeCode.String).ToString();
         CompanyEntity.Company_nvc           = Hepsa.Core.Common.PersentationController.GetEntityValue(Company_nvcTextBox.Text, TypeCode.String).ToString();
         CompanyEntity.DirectorName_nvc      = Hepsa.Core.Common.PersentationController.GetEntityValue(DirectorName_nvcTextBox.Text, TypeCode.String).ToString();
         CompanyEntity.DirectorMobile_nvc    = Hepsa.Core.Common.PersentationController.GetEntityValue(DirectorMobile_nvcTextBox.Text, TypeCode.String).ToString();
         CompanyEntity.Phone_nvc             = Hepsa.Core.Common.PersentationController.GetEntityValue(Phone_nvcTextBox.Text, TypeCode.String).ToString();
         CompanyEntity.Fax_nvc               = Hepsa.Core.Common.PersentationController.GetEntityValue(Fax_nvcTextBox.Text, TypeCode.String).ToString();
         CompanyEntity.Email_nvc             = Hepsa.Core.Common.PersentationController.GetEntityValue(Email_nvcTextBox.Text, TypeCode.String).ToString();
         CompanyEntity.WebAddress_nvc        = Hepsa.Core.Common.PersentationController.GetEntityValue(WebAddress_nvcTextBox.Text, TypeCode.String).ToString();
         CompanyEntity.Active_bit            = Active_bitCheckBox.Checked;
         CompanyEntity.InfractionGroupID_int = (Nullable <Int32>)Hepsa.Core.Common.PersentationController.GetEntityValue(InfractionGroupID_intComboBox.SelectedValue, TypeCode.Int32);
         CompanyEntity.Address_nvc           = Hepsa.Core.Common.PersentationController.GetEntityValue(Address_nvcTextBox.Text, TypeCode.String).ToString();
         CompanyEntity.CityID_int            = (Nullable <Int32>)Hepsa.Core.Common.PersentationController.GetEntityValue(CityID_intComboBox.SelectedValue, TypeCode.Int32);
         CompanyEntity.CityCode_nvc          = Hepsa.Core.Common.PersentationController.GetEntityValue(CityCode_nvcTextBox.Text, TypeCode.String).ToString();
         CompanyEntity.GroupID_int           = (Int32?)Hepsa.Core.Common.PersentationController.GetEntityValue(CompanyGroupComboBox.SelectedValue, TypeCode.Int32);
         CompanyFactory.BeginProc();
         CompanyFactory.Insert(CompanyEntity);
         CompanyFactory.CommitProc();
         if (DataTable != null)
         {
             DataRow dr = this.DataTable.NewRow();
             dr[HPS.BLL.CompanyBLL.BLLCompany_T.Company_TField.CompanyID_int.ToString()]         = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(CompanyEntity.CompanyID_int, TypeCode.Int32);
             dr[HPS.BLL.CompanyBLL.BLLCompany_T.Company_TField.CompanyCode_nvc.ToString()]       = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(CompanyEntity.CompanyCode_nvc, TypeCode.String);
             dr[HPS.BLL.CompanyBLL.BLLCompany_T.Company_TField.Company_nvc.ToString()]           = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(CompanyEntity.Company_nvc, TypeCode.String);
             dr[HPS.BLL.CompanyBLL.BLLCompany_T.Company_TField.DirectorName_nvc.ToString()]      = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(CompanyEntity.DirectorName_nvc, TypeCode.String);
             dr[HPS.BLL.CompanyBLL.BLLCompany_T.Company_TField.DirectorMobile_nvc.ToString()]    = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(CompanyEntity.DirectorMobile_nvc, TypeCode.String);
             dr[HPS.BLL.CompanyBLL.BLLCompany_T.Company_TField.Phone_nvc.ToString()]             = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(CompanyEntity.Phone_nvc, TypeCode.String);
             dr[HPS.BLL.CompanyBLL.BLLCompany_T.Company_TField.Fax_nvc.ToString()]               = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(CompanyEntity.Fax_nvc, TypeCode.String);
             dr[HPS.BLL.CompanyBLL.BLLCompany_T.Company_TField.Email_nvc.ToString()]             = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(CompanyEntity.Email_nvc, TypeCode.String);
             dr[HPS.BLL.CompanyBLL.BLLCompany_T.Company_TField.WebAddress_nvc.ToString()]        = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(CompanyEntity.WebAddress_nvc, TypeCode.String);
             dr[HPS.BLL.CompanyBLL.BLLCompany_T.Company_TField.Active_bit.ToString()]            = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(CompanyEntity.Active_bit, TypeCode.Boolean);
             dr[HPS.BLL.CompanyBLL.BLLCompany_T.Company_TField.InfractionGroupID_int.ToString()] = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(CompanyEntity.InfractionGroupID_int, TypeCode.Int32);
             dr["InfractionGroupID_intInfractionGroup_nvc"] = Hepsa.Core.Common.PersentationController.GetComboBoxDisplayMember(InfractionGroupID_intComboBox);
             dr[HPS.BLL.CompanyBLL.BLLCompany_T.Company_TField.Address_nvc.ToString()] = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(CompanyEntity.Address_nvc, TypeCode.String);
             dr[HPS.BLL.CompanyBLL.BLLCompany_T.Company_TField.CityID_int.ToString()]  = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(CompanyEntity.CityID_int, TypeCode.Int32);
             dr["CityID_intCity_nvc"] = Hepsa.Core.Common.PersentationController.GetComboBoxDisplayMember(CityID_intComboBox);
             dr[HPS.BLL.CompanyBLL.BLLCompany_T.Company_TField.CityCode_nvc.ToString()] = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(CompanyEntity.CityCode_nvc, TypeCode.String);
             dr["GroupName_nvc"] = Hepsa.Core.Common.PersentationController.GetComboBoxDisplayMember(CompanyGroupComboBox);
             DataTable.Rows.Add(dr);
             DataTable.AcceptChanges();
         }
         this.ClearForm(this);
     }
     catch (Exception ex)
     {
         CompanyFactory.RollBackProc();
         throw ex;
     }
 }
Exemple #5
0
        private void FillCombo()
        {
            try
            {
                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);
                this.LaderTypeID_intComboBox.DisplayMember = HPS.BLL.LaderTypeBLL.BLLLaderType_T.LaderType_TField.LaderType_nvc.ToString();
                this.LaderTypeID_intComboBox.ValueMember   = HPS.BLL.LaderTypeBLL.BLLLaderType_T.LaderType_TField.LaderTypeID_int.ToString();
                this.LaderTypeID_intComboBox.DataSource    = LaderTypeID_intDataTable;
                this.LaderTypeID_intComboBox.SelectedIndex = -1;

                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);
                ////DataRow Companydr = CompanyID_intDataTable.NewRow();
                ////Companydr["CompanyID_int"] = 0;
                ////CompanyID_intDataTable.Rows.InsertAt(Companydr, 0);
                //this.CompanyID_intComboBox.DisplayMember = HPS.BLL.CompanyBLL.BLLCompany_T.Company_TField.Company_nvc.ToString();
                //this.CompanyID_intComboBox.ValueMember = HPS.BLL.CompanyBLL.BLLCompany_T.Company_TField.CompanyID_int.ToString();
                //this.CompanyID_intComboBox.DataSource = CompanyID_intDataTable;
                //this.CompanyID_intComboBox.SelectedIndex = -1;

                HPS.BLL.GoodBLL.BLLGood_TFactory GoodFactory = new HPS.BLL.GoodBLL.BLLGood_TFactory();
                DataTable GoodID_intDataTable = new DataTable();
                GoodFactory.GetAll(ref GoodID_intDataTable);
                this.GoodID_intcomboBox.DisplayMember = HPS.BLL.GoodBLL.BLLGood_T.Good_TField.Good_nvc.ToString();
                this.GoodID_intcomboBox.ValueMember   = HPS.BLL.GoodBLL.BLLGood_T.Good_TField.GoodID_int.ToString();
                this.GoodID_intcomboBox.DataSource    = GoodID_intDataTable;
                this.GoodID_intcomboBox.SelectedIndex = -1;

                HPS.BLL.PortPlacesBLL.BLLPortPlaces_TFactory PortPlaceFactory = new HPS.BLL.PortPlacesBLL.BLLPortPlaces_TFactory();
                DataTable PortPlaceID_intDataTable = new DataTable();
                PortPlaceFactory.GetAll(ref PortPlaceID_intDataTable);
                this.PortPlaceID_intcomboBox.DisplayMember = HPS.BLL.PortPlacesBLL.BLLPortPlaces_T.PortPlaces_TField.PortPlaces_nvc.ToString();
                this.PortPlaceID_intcomboBox.ValueMember   = HPS.BLL.PortPlacesBLL.BLLPortPlaces_T.PortPlaces_TField.PortPlacesID_int.ToString();
                this.PortPlaceID_intcomboBox.DataSource    = PortPlaceID_intDataTable;
                this.PortPlaceID_intcomboBox.SelectedIndex = -1;

                HPS.BLL.CityBLL.BLLCity_TFactory CityFactory = new HPS.BLL.CityBLL.BLLCity_TFactory();
                DataTable DestinationCityID_intDataTable     = new DataTable();
                CityFactory.GetAll(ref DestinationCityID_intDataTable);
                this.DestinationCityID_intcomboBox.DisplayMember = HPS.BLL.CityBLL.BLLCity_T.City_TField.City_nvc.ToString();
                this.DestinationCityID_intcomboBox.ValueMember   = HPS.BLL.CityBLL.BLLCity_T.City_TField.CityID_int.ToString();
                this.DestinationCityID_intcomboBox.DataSource    = DestinationCityID_intDataTable;
                this.DestinationCityID_intcomboBox.SelectedIndex = -1;
            }
            catch (Exception ex)
            {
                Hepsa.Core.Common.MessageBox.ErrorMessage(ex.Message);
            }
        }
Exemple #6
0
 private void LoadCompany()
 {
     try
     {
         HPS.BLL.CompanyBLL.BLLCompany_TFactory CompanyFactory = new HPS.BLL.CompanyBLL.BLLCompany_TFactory();
         DataTable CompanyDataTable = new DataTable();
         CompanyFactory.GetAll(ref CompanyDataTable);
         this.CompanyGridView.DataSource = CompanyDataTable;
     }
     catch (System.Exception ex)
     {
         throw ex;
     }
 }
Exemple #7
0
 private void CompanyGroupComboBox_SelectionChangeCommitted(object sender, EventArgs e)
 {
     try
     {
         DataTable CompanyID_intDataTable = new DataTable();
         HPS.BLL.CompanyBLL.BLLCompany_TFactory CompanyID_intFactory = new HPS.BLL.CompanyBLL.BLLCompany_TFactory();
         string CompanyCondition = string.Format("[Company_T].[Active_bit]='true' AND Company_T.GroupID_int={0}", CompanyGroupComboBox.SelectedValue);
         CompanyID_intFactory.GetAllByCondition(CompanyCondition, ref CompanyID_intDataTable);
         companyGrid.SetDataBinding(CompanyID_intDataTable, "CompanyID_intDataTable");
     }
     catch (Exception ex)
     {
         Hepsa.Core.Common.MessageBox.ErrorMessage(ex.Message);
     }
 }
Exemple #8
0
 private void LoadCompany()
 {
     try
     {
         HPS.BLL.CompanyBLL.BLLCompany_TFactory CompanyFactory = new HPS.BLL.CompanyBLL.BLLCompany_TFactory();
         string    Condition        = "[Company_T].[Active_bit]='true'";
         DataTable CompanyDataTable = new DataTable();
         CompanyFactory.GetAllByCondition(Condition, ref CompanyDataTable);
         this.CompanyGridView.DataSource = CompanyDataTable;
     }
     catch (System.Exception ex)
     {
         throw ex;
     }
 }
Exemple #9
0
        private void SearchButton_Click(object sender, EventArgs e)
        {
            if (CompanyGridView.CurrentRow != null)
            {
                HPS.BLL.CompanyBLL.BLLCompany_TFactory CompanyFactory = new HPS.BLL.CompanyBLL.BLLCompany_TFactory();
                HPS.BLL.CompanyBLL.BLLCompany_TKeys    CompanyKey     = new HPS.BLL.CompanyBLL.BLLCompany_TKeys();
                CompanyKey.CompanyID_int = (Int32)CompanyGridView.CurrentRow.Cells[colCompanyID_int.Name].Value;
                CompanyEntity            = CompanyFactory.GetBy(CompanyKey);

                if (string.IsNullOrEmpty(Hepsa.Core.Common.PersentationController.GetEntityValue(CompanyGridView.CurrentRow.Cells[colCompanyID_int.Name].Value, TypeCode.String).ToString()) == false)
                {
                    CompanyEntity.Company_nvc = Convert.ToString(Hepsa.Core.Common.PersentationController.GetEntityValue(CompanyGridView.CurrentRow.Cells[colCompany_nvc.Name].Value, TypeCode.String));
                }
            }
            this.Close();
        }
Exemple #10
0
 private void InfractionListForm_Load(object sender, EventArgs e)
 {
     try
     {
         HPS.BLL.CompanyBLL.BLLCompany_TFactory CompanyID_intFactory = new HPS.BLL.CompanyBLL.BLLCompany_TFactory();
         DataTable CompanyID_intDataTable = new DataTable();
         string    companyCondition       = "Company_T.Active_bit='True'";
         CompanyID_intFactory.GetAllByCondition(companyCondition, ref CompanyID_intDataTable);
         this.CompanyID_intComboBox.DisplayMember = HPS.BLL.CompanyBLL.BLLCompany_T.Company_TField.Company_nvc.ToString();
         this.CompanyID_intComboBox.ValueMember   = HPS.BLL.CompanyBLL.BLLCompany_T.Company_TField.CompanyID_int.ToString();
         this.CompanyID_intComboBox.DataSource    = CompanyID_intDataTable;
         this.CompanyID_intComboBox.SelectedIndex = -1;
     }
     catch (Exception ex)
     {
         Hepsa.Core.Common.MessageBox.ErrorMessage(ex.Message);
         this.Close();
     }
 }
Exemple #11
0
        private void FillGrid()
        {
            try
            {
                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.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(CityFactory.ServerJalaliDate);
                this.ToDatefaDatePicker.SelectedDateTime   = FarsiLibrary.Utils.PersianDateConverter.ToGregorianDateTime(CityFactory.ServerJalaliDate);
                //this.FromTimeTextBox.Text = "08:00:00";
                //this.ToTimeTextBox.Text = CityFactory.ServerTime;
            }
            catch (Exception ex)
            {
                Hepsa.Core.Common.MessageBox.ErrorMessage(ex.Message);
            }
        }
Exemple #12
0
        private void OutTrafficReportForm_Load(object sender, EventArgs e)
        {
            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);
            DataRow Companydr = CompanyID_intDataTable.NewRow();

            Companydr["CompanyID_int"] = 0;
            CompanyID_intDataTable.Rows.InsertAt(Companydr, 0);
            this.CompanyID_intComboBox.DisplayMember = HPS.BLL.CompanyBLL.BLLCompany_T.Company_TField.Company_nvc.ToString();
            this.CompanyID_intComboBox.ValueMember   = HPS.BLL.CompanyBLL.BLLCompany_T.Company_TField.CompanyID_int.ToString();
            this.CompanyID_intComboBox.DataSource    = CompanyID_intDataTable;
            this.CompanyID_intComboBox.SelectedIndex = -1;


            this.FromDatefaDatePicker.SelectedDateTime = FarsiLibrary.Utils.PersianDateConverter.ToGregorianDateTime(CompanyID_intFactory.ServerJalaliDate.ToString());
            this.ToDatefaDatePicker.SelectedDateTime   = FarsiLibrary.Utils.PersianDateConverter.ToGregorianDateTime(CompanyID_intFactory.ServerJalaliDate.ToString());
        }
Exemple #13
0
        private void FillCombo()
        {
            try
            {
                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);
                DataRow Companydr = CompanyID_intDataTable.NewRow();
                Companydr["CompanyID_int"] = 0;
                CompanyID_intDataTable.Rows.InsertAt(Companydr, 0);
                this.CompanyID_intComboBox.DisplayMember = HPS.BLL.CompanyBLL.BLLCompany_T.Company_TField.Company_nvc.ToString();
                this.CompanyID_intComboBox.ValueMember   = HPS.BLL.CompanyBLL.BLLCompany_T.Company_TField.CompanyID_int.ToString();
                this.CompanyID_intComboBox.DataSource    = CompanyID_intDataTable;
                this.CompanyID_intComboBox.SelectedIndex = -1;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemple #14
0
 protected override void ShowForm()
 {
     this.FillCombo();
     HPS.BLL.CompanyBLL.BLLCompany_TFactory CompanyFactory = new HPS.BLL.CompanyBLL.BLLCompany_TFactory();
     HPS.BLL.CompanyBLL.BLLCompany_T        CompanyEntity  = CompanyFactory.GetBy((HPS.BLL.CompanyBLL.BLLCompany_TKeys)Key);
     if (CompanyEntity == null)
     {
         throw new HPS.Exceptions.CompanyNotFound();
     }
     CompanyCode_nvcTextBox.Text    = Convert.ToString(Hepsa.Core.Common.PersentationController.GetEntityValue(CompanyEntity.CompanyCode_nvc, TypeCode.String));
     Company_nvcTextBox.Text        = Convert.ToString(Hepsa.Core.Common.PersentationController.GetEntityValue(CompanyEntity.Company_nvc, TypeCode.String));
     DirectorName_nvcTextBox.Text   = Convert.ToString(Hepsa.Core.Common.PersentationController.GetEntityValue(CompanyEntity.DirectorName_nvc, TypeCode.String));
     DirectorMobile_nvcTextBox.Text = Convert.ToString(Hepsa.Core.Common.PersentationController.GetEntityValue(CompanyEntity.DirectorMobile_nvc, TypeCode.String));
     Phone_nvcTextBox.Text          = Convert.ToString(Hepsa.Core.Common.PersentationController.GetEntityValue(CompanyEntity.Phone_nvc, TypeCode.String));
     Fax_nvcTextBox.Text            = Convert.ToString(Hepsa.Core.Common.PersentationController.GetEntityValue(CompanyEntity.Fax_nvc, TypeCode.String));
     Email_nvcTextBox.Text          = Convert.ToString(Hepsa.Core.Common.PersentationController.GetEntityValue(CompanyEntity.Email_nvc, TypeCode.String));
     WebAddress_nvcTextBox.Text     = Convert.ToString(Hepsa.Core.Common.PersentationController.GetEntityValue(CompanyEntity.WebAddress_nvc, TypeCode.String));
     Active_bitCheckBox.Checked     = (Boolean)Hepsa.Core.Common.PersentationController.GetEntityValue(CompanyEntity.Active_bit, TypeCode.Boolean);
     Hepsa.Core.Common.PersentationController.SetComboBoxValue(ref InfractionGroupID_intComboBox, CompanyEntity.InfractionGroupID_int, TypeCode.Int32);
     Address_nvcTextBox.Text = Convert.ToString(Hepsa.Core.Common.PersentationController.GetEntityValue(CompanyEntity.Address_nvc, TypeCode.String));
     Hepsa.Core.Common.PersentationController.SetComboBoxValue(ref CityID_intComboBox, CompanyEntity.CityID_int, TypeCode.Int32);
     CityCode_nvcTextBox.Text = Convert.ToString(Hepsa.Core.Common.PersentationController.GetEntityValue(CompanyEntity.CityCode_nvc, TypeCode.String));
 }
Exemple #15
0
        private void FillCombo()
        {
            try
            {
                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);
                this.LaderTypecheckedComboBox.DropDownDataSource    = LaderTypeID_intDataTable;
                this.LaderTypecheckedComboBox.DropDownDataMember    = "LaderType_T";
                this.LaderTypecheckedComboBox.DropDownDisplayMember = HPS.BLL.LaderTypeBLL.BLLLaderType_T.LaderType_TField.LaderType_nvc.ToString();
                this.LaderTypecheckedComboBox.DropDownValueMember   = HPS.BLL.LaderTypeBLL.BLLLaderType_T.LaderType_TField.LaderTypeID_int.ToString();
                LaderTypecheckedComboBox.RetrieveStructure();
                LaderTypecheckedComboBox.DropDownList.Columns[1].Visible  = false;
                LaderTypecheckedComboBox.DropDownList.Columns[2].Visible  = false;
                LaderTypecheckedComboBox.DropDownList.Columns[4].Visible  = false;
                LaderTypecheckedComboBox.DropDownList.Columns[3].Caption  = "بارگیر";
                LaderTypecheckedComboBox.DropDownList.Columns[3].Width    = 300;
                LaderTypecheckedComboBox.DropDownList.Columns[5].Visible  = false;
                LaderTypecheckedComboBox.DropDownList.Columns[6].Visible  = false;
                LaderTypecheckedComboBox.DropDownList.Columns[7].Visible  = false;
                LaderTypecheckedComboBox.DropDownList.Columns[8].Visible  = false;
                LaderTypecheckedComboBox.DropDownList.Columns[9].Visible  = false;
                LaderTypecheckedComboBox.DropDownList.Columns[10].Visible = false;


                HPS.BLL.CompanyBLL.BLLCompany_TFactory CompanyID_intFactory = new HPS.BLL.CompanyBLL.BLLCompany_TFactory();
                DataTable CompanyID_intDataTable = new DataTable();
                string    CompanyCondition       = "[Company_T].[Active_bit]='true'";
                CompanyID_intFactory.GetAllByCondition(CompanyCondition, ref CompanyID_intDataTable);
                DataRow Companydr = CompanyID_intDataTable.NewRow();
                //Companydr["CompanyID_int"] = 0;
                //CompanyID_intDataTable.Rows.InsertAt(Companydr, 0);
                this.CompanyID_intcheckedComboBox.DropDownDataSource    = CompanyID_intDataTable;
                this.CompanyID_intcheckedComboBox.DropDownDataMember    = "Company_T";
                this.CompanyID_intcheckedComboBox.DropDownDisplayMember = HPS.BLL.CompanyBLL.BLLCompany_T.Company_TField.Company_nvc.ToString();
                this.CompanyID_intcheckedComboBox.DropDownValueMember   = HPS.BLL.CompanyBLL.BLLCompany_T.Company_TField.CompanyID_int.ToString();
                CompanyID_intcheckedComboBox.RetrieveStructure();
                CompanyID_intcheckedComboBox.DropDownList.Columns[1].Visible  = false;
                CompanyID_intcheckedComboBox.DropDownList.Columns[2].Visible  = false;
                CompanyID_intcheckedComboBox.DropDownList.Columns[4].Visible  = false;
                CompanyID_intcheckedComboBox.DropDownList.Columns[3].Caption  = "شرکت";
                CompanyID_intcheckedComboBox.DropDownList.Columns[3].Width    = 300;
                CompanyID_intcheckedComboBox.DropDownList.Columns[5].Visible  = false;
                CompanyID_intcheckedComboBox.DropDownList.Columns[6].Visible  = false;
                CompanyID_intcheckedComboBox.DropDownList.Columns[7].Visible  = false;
                CompanyID_intcheckedComboBox.DropDownList.Columns[8].Visible  = false;
                CompanyID_intcheckedComboBox.DropDownList.Columns[9].Visible  = false;
                CompanyID_intcheckedComboBox.DropDownList.Columns[10].Visible = false;
                CompanyID_intcheckedComboBox.DropDownList.Columns[11].Visible = false;
                CompanyID_intcheckedComboBox.DropDownList.Columns[12].Visible = false;
                CompanyID_intcheckedComboBox.DropDownList.Columns[13].Visible = false;
                CompanyID_intcheckedComboBox.DropDownList.Columns[14].Visible = false;
                CompanyID_intcheckedComboBox.DropDownList.Columns[15].Visible = false;
                CompanyID_intcheckedComboBox.DropDownList.Columns[16].Visible = false;
                CompanyID_intcheckedComboBox.DropDownList.Columns[17].Visible = false;
                CompanyID_intcheckedComboBox.DropDownList.Columns[18].Visible = false;


                HPS.BLL.LadBillCreditBLL.BLLLadBillCredit_TFactory LadBillCreditFactory = new HPS.BLL.LadBillCreditBLL.BLLLadBillCredit_TFactory();
                DataTable LadbillOrder1Table = new DataTable();
                LadBillCreditFactory.SelectLadBillCreditOrderColumn(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.SelectLadBillCreditOrderColumn(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.SelectLadBillCreditOrderColumn(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.SelectLadBillCreditOrderColumn(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.SelectLadBillCreditOrderColumn(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.TrafficBLL.BLLTraffic_TFactory Factory = new HPS.BLL.TrafficBLL.BLLTraffic_TFactory();
                this.FromDatefaDatePicker.SelectedDateTime = FarsiLibrary.Utils.PersianDateConverter.ToGregorianDateTime(Factory.ServerJalaliDate);
                this.ToDatefaDatePicker.SelectedDateTime   = FarsiLibrary.Utils.PersianDateConverter.ToGregorianDateTime(Factory.ServerJalaliDate);
            }
            catch (Exception ex)
            {
                Hepsa.Core.Common.MessageBox.ErrorMessage(ex.Message);
            }
        }
Exemple #16
0
        private void FillCombo()
        {
            try
            {
                HPS.BLL.AnnouncementTimeBLL.BLLAnnouncementTime_TFactory AnnouncementTimeID_intFactory = new HPS.BLL.AnnouncementTimeBLL.BLLAnnouncementTime_TFactory();
                DataTable AnnouncementTimeID_intDataTable = new DataTable();
                AnnouncementTimeID_intFactory.GetAll(ref AnnouncementTimeID_intDataTable);
                this.AnnouncementTimeID_intComboBox.DisplayMember = HPS.BLL.AnnouncementTimeBLL.BLLAnnouncementTime_T.AnnouncementTime_TField.AnnouncementTime_nvc.ToString();
                this.AnnouncementTimeID_intComboBox.ValueMember   = HPS.BLL.AnnouncementTimeBLL.BLLAnnouncementTime_T.AnnouncementTime_TField.AnnouncementTimeID_int.ToString();
                this.AnnouncementTimeID_intComboBox.DataSource    = AnnouncementTimeID_intDataTable;
                this.AnnouncementTimeID_intComboBox.SelectedIndex = -1;

                HPS.BLL.CityBLL.BLLCity_TFactory CityID_intFactory = new HPS.BLL.CityBLL.BLLCity_TFactory();
                DataTable CityID_intDataTable = new DataTable();
                CityID_intFactory.GetAll(ref CityID_intDataTable);
                this.CityID_intComboBox.DisplayMember = HPS.BLL.CityBLL.BLLCity_T.City_TField.City_nvc.ToString();
                this.CityID_intComboBox.ValueMember   = HPS.BLL.CityBLL.BLLCity_T.City_TField.CityID_int.ToString();
                this.CityID_intComboBox.DataSource    = CityID_intDataTable;
                this.CityID_intComboBox.SelectedIndex = -1;

                HPS.BLL.GoodBLL.BLLGood_TFactory GoodID_intFactory = new HPS.BLL.GoodBLL.BLLGood_TFactory();
                DataTable GoodID_intDataTable = new DataTable();
                GoodID_intFactory.GetAll(ref GoodID_intDataTable);
                this.GoodID_intComboBox.DisplayMember = HPS.BLL.GoodBLL.BLLGood_T.Good_TField.Good_nvc.ToString();
                this.GoodID_intComboBox.ValueMember   = HPS.BLL.GoodBLL.BLLGood_T.Good_TField.GoodID_int.ToString();
                this.GoodID_intComboBox.DataSource    = GoodID_intDataTable;
                this.GoodID_intComboBox.SelectedIndex = -1;

                HPS.BLL.BoxingBLL.BLLBoxing_TFactory BoxingID_intFactory = new HPS.BLL.BoxingBLL.BLLBoxing_TFactory();
                DataTable BoxingID_intDataTable = new DataTable();
                BoxingID_intFactory.GetAll(ref BoxingID_intDataTable);
                this.BoxingID_intComboBox.DisplayMember = HPS.BLL.BoxingBLL.BLLBoxing_T.Boxing_TField.BoxingType_nvc.ToString();
                this.BoxingID_intComboBox.ValueMember   = HPS.BLL.BoxingBLL.BLLBoxing_T.Boxing_TField.BoxingID_int.ToString();
                this.BoxingID_intComboBox.DataSource    = BoxingID_intDataTable;
                this.BoxingID_intComboBox.SelectedIndex = -1;

                HPS.BLL.PortPlacesBLL.BLLPortPlaces_TFactory PortPlaceID_intFactory = new HPS.BLL.PortPlacesBLL.BLLPortPlaces_TFactory();
                DataTable PortPlaceID_intDataTable = new DataTable();
                PortPlaceID_intFactory.GetAll(ref PortPlaceID_intDataTable);
                this.PortPlaceID_intComboBox.DisplayMember = HPS.BLL.PortPlacesBLL.BLLPortPlaces_T.PortPlaces_TField.PortPlaces_nvc.ToString();
                this.PortPlaceID_intComboBox.ValueMember   = HPS.BLL.PortPlacesBLL.BLLPortPlaces_T.PortPlaces_TField.PortPlacesID_int.ToString();
                this.PortPlaceID_intComboBox.DataSource    = PortPlaceID_intDataTable;
                this.PortPlaceID_intComboBox.SelectedIndex = -1;

                HPS.BLL.LaderTypeBLL.BLLLaderType_TFactory LaderTypeID_intFactory = new HPS.BLL.LaderTypeBLL.BLLLaderType_TFactory();
                DataTable LaderTypeID_intDataTable = new DataTable();
                LaderTypeID_intFactory.GetAll(ref LaderTypeID_intDataTable);
                this.LaderTypeID_intComboBox.DisplayMember = HPS.BLL.LaderTypeBLL.BLLLaderType_T.LaderType_TField.LaderType_nvc.ToString();
                this.LaderTypeID_intComboBox.ValueMember   = HPS.BLL.LaderTypeBLL.BLLLaderType_T.LaderType_TField.LaderTypeID_int.ToString();
                this.LaderTypeID_intComboBox.DataSource    = LaderTypeID_intDataTable;
                this.LaderTypeID_intComboBox.SelectedIndex = -1;

                HPS.BLL.CompanyBLL.BLLCompany_TFactory CompanyID_intFactory = new HPS.BLL.CompanyBLL.BLLCompany_TFactory();
                DataTable CompanyID_intDataTable = new DataTable();
                CompanyID_intFactory.GetAll(ref CompanyID_intDataTable);
                this.CompanyID_intComboBox.DisplayMember = HPS.BLL.CompanyBLL.BLLCompany_T.Company_TField.Company_nvc.ToString();
                this.CompanyID_intComboBox.ValueMember   = HPS.BLL.CompanyBLL.BLLCompany_T.Company_TField.CompanyID_int.ToString();
                this.CompanyID_intComboBox.DataSource    = CompanyID_intDataTable;
                this.CompanyID_intComboBox.SelectedIndex = -1;

                HPS.BLL.TrafficTypeBLL.BLLTrafficType_TFactory TrafficTypeID_intFactory = new HPS.BLL.TrafficTypeBLL.BLLTrafficType_TFactory();
                DataTable TrafficTypeID_intDataTable = new DataTable();
                TrafficTypeID_intFactory.GetAll(ref TrafficTypeID_intDataTable);
                this.TrafficTypeID_intComboBox.DisplayMember = HPS.BLL.TrafficTypeBLL.BLLTrafficType_T.TrafficType_TField.TrafficType_nvc.ToString();
                this.TrafficTypeID_intComboBox.ValueMember   = HPS.BLL.TrafficTypeBLL.BLLTrafficType_T.TrafficType_TField.TrafficTypeID_int.ToString();
                this.TrafficTypeID_intComboBox.DataSource    = TrafficTypeID_intDataTable;
                this.TrafficTypeID_intComboBox.SelectedIndex = -1;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemple #17
0
        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;
        }