Example #1
0
    void kawasan()
    {
        DataSet Ds = new DataSet();

        try
        {
            SqlConnection  con  = new SqlConnection(cs);
            string         com  = "select kawasan_code,kavasan_name from Ref_Cawangan  group by kawasan_code,kavasan_name order by kavasan_name asc";
            SqlDataAdapter adpt = new SqlDataAdapter(com, con);
            DataTable      dt   = new DataTable();
            adpt.Fill(dt);
            TextBox18.DataSource = dt;
            TextBox18.DataBind();
            TextBox18.DataTextField  = "kavasan_name";
            TextBox18.DataValueField = "kawasan_code";

            TextBox18.DataBind();
            TextBox18.Items.Insert(0, new ListItem("EMPTY", "EMPTY"));
            TextBox18.Items.Insert(0, new ListItem("--- PILIH ---", ""));
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }
 protected void TextBox5_TextChanged(object sender, System.EventArgs e)
 {
     try
     {
         float a = float.Parse(TextBox17.Text);
         float b = float.Parse(TextBox5.Text);
         TextBox18.Text = (a * b).ToString();
         TextBox18.Focus();
     }
     catch (Exception we)
     { }
 }