Example #1
0
        protected void FinancialPos_CheckedChanged(object sender, EventArgs e)
        {
            TklfaRow.Visible = true;
            //if(FinancialPos.Checked == true)
            //{
            //    if(AddRelatednumList.Items.Count>0)
            //    {
            //        AddRelatednumList.Items.Clear();
            //    }
            //    FinancialPosTypeList.Enabled = true;
            //    AddRelatednumList.Enabled = true;
            //    DriverList = db.Driver.ToList();
            //    AddRelatednumList.DataSource = DriverList;
            //    AddRelatednumList.DataValueField = "Id";
            //    AddRelatednumList.DataTextField = "Name";
            //    AddRelatednumList.DataBind();
            //}
            //else
            //{
            //    FinancialPosTypeList.Enabled = false;
            //    AddRelatednumList.Enabled = false;
            //}
            if (AddRelatednumList.Items.Count > 0)
            {
                AddRelatednumList.Items.Clear();
            }

            CarsList = db.Cars.ToList();
            AddRelatednumList.DataSource     = CarsList;
            AddRelatednumList.DataValueField = "Id";
            AddRelatednumList.DataTextField  = "CarNo";
            AddRelatednumList.DataBind();
        }
Example #2
0
        protected void FinancialPosTypeList_SelectedIndexChanged(object sender, EventArgs e)
        {
            //if(FinancialPosTypeList.SelectedIndex == 0)
            //{
            //    if (AddRelatednumList.Items.Count > 0)
            //    {
            //        AddRelatednumList.Items.Clear();
            //    }
            //    DriverList = db.Driver.ToList();
            //    AddRelatednumList.DataSource = DriverList;
            //    AddRelatednumList.DataValueField = "Id";
            //    AddRelatednumList.DataTextField = "Name";
            //    AddRelatednumList.DataBind();
            //}
            //else
            //{
            if (AddRelatednumList.Items.Count > 0)
            {
                AddRelatednumList.Items.Clear();
            }

            CarsList = db.Cars.ToList();
            AddRelatednumList.DataSource     = CarsList;
            AddRelatednumList.DataValueField = "Id";
            AddRelatednumList.DataTextField  = "CarNo";
            AddRelatednumList.DataBind();
            //   }
        }
Example #3
0
        protected void add_Edit_financialPosInfo(int id, string val)
        {
            FinancialPos.Checked               = true;
            FinancialPosTypeList.Enabled       = true;
            AddRelatednumList.Enabled          = true;
            FinancialPosTypeList.SelectedValue = val;
            if (FinancialPosTypeList.SelectedIndex == 0)
            {
                if (AddRelatednumList.Items.Count > 0)
                {
                    AddRelatednumList.Items.Clear();
                }
                DriverList = db.Driver.ToList();
                AddRelatednumList.DataSource     = DriverList;
                AddRelatednumList.DataValueField = "Id";
                AddRelatednumList.DataTextField  = "Name";
                AddRelatednumList.DataBind();
            }
            else
            {
                if (AddRelatednumList.Items.Count > 0)
                {
                    AddRelatednumList.Items.Clear();
                }

                CarsList = db.Cars.ToList();
                AddRelatednumList.DataSource     = CarsList;
                AddRelatednumList.DataValueField = "Id";
                AddRelatednumList.DataTextField  = "CarNo";
                AddRelatednumList.DataBind();
            }
            AddRelatednumList.SelectedValue = id.ToString();
        }