private void FillDataSources()
        {
            PopulateCustomers();

            PopulateMonthAndYear();

            PopulateSKPIsignatories();

            PopulateTypeAndPurpose();

            PopulatePEZAsignatories();

            cboCurrency.ItemsSource = ClsPEZAData.GetCurrencyList().DefaultView;

            cbo8106ItemDescription.ItemsSource = ClsPEZAData.GetPEZAitemsList().DefaultView;

            cboLOAEstimatedUOM.ItemsSource = ClsCantierDB.GetUOM().DefaultView;

            PopulateList();

            grid8106.SelectedItems.Clear();

            tbPEZAPermitNo.Text = string.Empty;

            tbORNo.Text = "0";

            tb8106ItemNo.Text = "1";
        }
Example #2
0
 private void PopulateCurrency()
 {
     cboCurrency.ItemsSource   = ClsPEZAData.GetCurrencyList().DefaultView;
     cboCurrency.SelectedIndex = 0;
 }
Example #3
0
        private void PopulateFields(string formNo)
        {
            foreach (DataRow dr in ClsPEZAData.Get8112formByNo(formNo).Rows)
            {
                tbPEZAFormNumber.Text = dr["8112formNo"].ToString().Trim();

                datePEZA.SelectedDate = Convert.ToDateTime(dr["8112date"]);

                PopulateTypeAndPurpose();

                cboType.SelectedValue = dr["8112LOAtype"].ToString().Trim();

                tbPEZAPermitNo.Text = dr["8112controlNo"].ToString().Trim();

                PopulateCustomers();

                cboCustomer.SelectedValue = dr["8112client"].ToString().Trim();

                int id = Convert.ToInt32(dr["8112client"].ToString().Trim());

                foreach (DataRow dr1 in ClsCantierDB.GetCustomerAddress(id).Rows)
                {
                    tbCustomerAddress.Text = dr1["Address"].ToString().Trim();
                }

                PopulateAvailableInvoices();

                PopulateUsedInvoices();

                PopulateSKPIsignatories();

                PopulatePEZAsignatories();

                cboCurrency.ItemsSource = ClsPEZAData.GetCurrencyList().DefaultView;

                cbo8106ItemDescription.ItemsSource = ClsPEZAData.GetPEZAitemsList().DefaultView;

                cboLOAEstimatedUOM.ItemsSource = ClsCantierDB.GetUOM().DefaultView;

                GroupLOA.IsEnabled = true;

                cboAuthorizedOfficial1.SelectedValue = dr["8112PEZAauthorizedOfficial1"].ToString().Trim();

                cboAuthorizedOfficial2.SelectedValue = dr["8112PEZAauthorizedOfficial2"].ToString().Trim();

                cboSKPIAuthorizedSignatory.SelectedValue = dr["8112SKPIauthorizedOfficial"].ToString().Trim();

                tb8106ItemNo.Text = dr["8112itemNo"].ToString();

                tbORNo.Text = dr["8112PEZApermitOR"].ToString().Trim();

                //if (!dr.IsNull("BoatNote"))
                //{
                //    tbBoatNoteNo.Text = dr["BoatNote"].ToString().Trim();
                //}

                if (!dr.IsNull("8112deliveryDate"))
                {
                    dateDelivered.SelectedDate = Convert.ToDateTime(dr["8112deliveryDate"]);
                }

                cboCurrency.SelectedValue = dr["8112currency"].ToString().Trim();

                if (!dr.IsNull("8112partCode"))
                {
                    cbo8106ItemDescription.SelectedValue = dr["8112partCode"].ToString();
                }

                Int16 client = Convert.ToInt16(dr["8112client"].ToString().Trim());

                cboPEZALOANo.ItemsSource = ClsPEZAData.GetClientLOAlist(client, dr["8112LOAtype"].ToString().Trim()).DefaultView;

                if (!dr.IsNull("8112LOA"))
                {
                    cboPEZALOANo.SelectedValue = dr["8112LOA"].ToString().Trim();
                    GetLOADetails(dr["8112LOA"].ToString().Trim());
                }

                if (!dr.IsNull("8112unit"))
                {
                    cboLOAEstimatedUOM.SelectedValue = dr["8112unit"].ToString().Trim();
                }

                if (!dr.IsNull("8112estQty"))
                {
                    tbLOAEstimatedQty.Text = string.Format("{0:#,###0.#}", Convert.ToInt32(dr["8112estQty"]));
                }

                if (!dr.IsNull("8112estAmt"))
                {
                    tbLOATotalEstimatedAmount.Text = string.Format("{0:#,###0.#}", Convert.ToInt32(dr["8112estAmt"]));
                }

                ComputeActualQtyNamt();
            }
        }