private void LoadPlantcode()
 {
     try
     {
         SqlDataReader dr = null;
         ddl_Plantcode.Items.Clear();
         ddl_Plantname.Items.Clear();
         dr = Bllusers.LoadPlantcode(ccode.ToString());
         if (dr.HasRows)
         {
             while (dr.Read())
             {
                 ddl_Plantcode.Items.Add(dr["Plant_Code"].ToString());
                 ddl_Plantname.Items.Add(dr["Plant_Code"].ToString() + "_" + dr["Plant_Name"].ToString());
             }
         }
         else
         {
             ddl_Plantcode.Items.Add("--Select PlantName--");
             ddl_Plantname.Items.Add("--Select Plantcode--");
         }
     }
     catch (Exception EE)
     {
         string message;
         message = EE.ToString();
         string script = "window.onload = function(){ alert('";
         script += message;
         script += "')};";
         ClientScript.RegisterStartupScript(this.GetType(), "SuccessMessage", script, true);
     }
 }
Beispiel #2
0
 private void LoadPlantcode()
 {
     try
     {
         SqlDataReader dr = null;
         ddl_PlantID.Items.Clear();
         ddl_PlantName.Items.Clear();
         dr = Bllusers.LoadPlantcode(companycode.ToString());
         if (dr.HasRows)
         {
             while (dr.Read())
             {
                 ddl_PlantID.Items.Add(dr["Plant_Code"].ToString());
                 ddl_PlantName.Items.Add(dr["Plant_Code"].ToString() + "_" + dr["Plant_Name"].ToString());
             }
         }
         else
         {
             ddl_PlantID.Items.Add("--Select PlantName--");
             ddl_PlantName.Items.Add("--Select Plantcode--");
         }
     }
     catch (Exception ex)
     {
         WebMsgBox.Show(ex.ToString());
     }
 }
 private void LoadPlantcode()
 {
     try
     {
         SqlDataReader dr = null;
         ddl_Plantcode.Items.Clear();
         ddl_Plantname.Items.Clear();
         dr = Bllusers.LoadPlantcode(ccode.ToString());
         if (dr.HasRows)
         {
             while (dr.Read())
             {
                 ddl_Plantcode.Items.Add(dr["Plant_Code"].ToString());
                 ddl_Plantname.Items.Add(dr["Plant_Code"].ToString() + "_" + dr["Plant_Name"].ToString());
             }
         }
         else
         {
             ddl_Plantcode.Items.Add("--Select PlantName--");
             ddl_Plantname.Items.Add("--Select Plantcode--");
         }
     }
     catch (Exception ex)
     {
         Response.Write("<script language='javascript'>alert('" + Server.HtmlEncode(ex.Message) + "')</script>");
     }
 }
 private void CheckRemarksUpdate()
 {
     try
     {
         SqlDataReader dr = null;
         dr = Bllusers.LoadPlantcode(Company_code);
         if (dr.HasRows)
         {
             while (dr.Read())
             {
                 ddl_Plantcode.Items.Add(dr["Plant_Code"].ToString());
                 ddl_Plantname.Items.Add(dr["Plant_Code"].ToString() + "_" + dr["Plant_Name"].ToString());
             }
         }
     }
     catch (Exception ex)
     {
         WebMsgBox.Show(ex.ToString());
     }
 }
Beispiel #5
0
    private void LoadPlantcode()
    {
        try
        {
            SqlDataReader dr = null;

            dr = Bllusers.LoadPlantcode(ccode.ToString());
            if (dr.HasRows)
            {
                while (dr.Read())
                {
                    ddl_Plantcode.Items.Add(dr["Plant_Code"].ToString());
                    ddl_PlantName.Items.Add(dr["Plant_Code"].ToString() + "_" + dr["Plant_Name"].ToString());
                }
            }
        }
        catch (Exception ex)
        {
            message = ex.Message.ToString();
            msgbox();
        }
    }
Beispiel #6
0
 private void LoadPlantcode()
 {
     try
     {
         SqlDataReader dr = null;
         ddl_Plantname.Items.Clear();
         ddl_Plantname.Items.Clear();
         dr = Bllusers.LoadPlantcode(ccode);
         if (dr.HasRows)
         {
             while (dr.Read())
             {
                 ddl_Plantname.Items.Add(dr["Plant_Code"].ToString() + "_" + dr["Plant_Name"].ToString());
             }
         }
     }
     catch (Exception ex)
     {
         lblmsg.Visible = true;
         lblmsg.Text    = ex.ToString();
     }
 }
 private void LoadPlantcode()
 {
     try
     {
         SqlDataReader dr = null;
         DDL_Plantfrom.Items.Clear();
         ddl_Plantcode.Items.Clear();
         dr = Bllusers.LoadPlantcode(companycode);
         if (dr.HasRows)
         {
             while (dr.Read())
             {
                 ddl_Plantcode.Items.Add(dr["Plant_Code"].ToString());
                 DDL_Plantfrom.Items.Add(dr["Plant_Code"].ToString() + "_" + dr["Plant_Name"].ToString());
             }
         }
     }
     catch (Exception ex)
     {
         catchmsg(ex.ToString());
     }
 }
Beispiel #8
0
 private void LoadPlantcode()
 {
     try
     {
         SqlDataReader dr = null;
         dr = Bllusers.LoadPlantcode(ccode);
         if (dr.HasRows)
         {
             while (dr.Read())
             {
                 ddl_Plantcode.Items.Add(dr["Plant_Code"].ToString());
                 ddl_Plantname.Items.Add(dr["Plant_Code"].ToString() + "_" + dr["Plant_Name"].ToString());
             }
             ddl_Plantname.SelectedIndex = 1;
             ddl_Plantcode.SelectedIndex = 1;
             pcode = ddl_Plantcode.SelectedItem.Value;
         }
     }
     catch (Exception ex)
     {
         WebMsgBox.Show(ex.ToString());
     }
 }
 private void LoadPlantcode()
 {
     try
     {
         SqlDataReader dr = null;
         ddl_Plantcode.Items.Clear();
         ddl_Plantname.Items.Clear();
         txt_PlantPhoneNo.Items.Clear();
         dr = Bllusers.LoadPlantcode(ccode);
         if (dr.HasRows)
         {
             while (dr.Read())
             {
                 ddl_Plantcode.Items.Add(dr["Plant_Code"].ToString());
                 ddl_Plantname.Items.Add(dr["Plant_Code"].ToString() + "_" + dr["Plant_Name"].ToString());
                 txt_PlantPhoneNo.Items.Add(dr["Mana_PhoneNo"].ToString());
             }
         }
     }
     catch (Exception ex)
     {
         WebMsgBox.Show(ex.ToString());
     }
 }
Beispiel #10
0
 private void LoadPlantName()
 {
     try
     {
         SqlDataReader dr = null;
         dr = Bllusers.LoadPlantcode(Convert.ToString(Company_code));
         if (dr.HasRows)
         {
             while (dr.Read())
             {
                 ddl_Plantname.Items.Add(dr["Plant_Code"].ToString() + "_" + dr["Plant_Name"].ToString());
                 ddl_Plantcode.Items.Add(dr["Plant_Code"].ToString());
             }
         }
         else
         {
             ddl_Plantname.Items.Add("-Select Plant-");
         }
     }
     catch (Exception ex)
     {
         uscMsgBox1.AddMessage("" + ex, MessageBoxUsc_Message.enmMessageType.Attention);
     }
 }