Exemplo n.º 1
0
        protected void ddl_Asset_product_type_ad_SelectedIndexChanged(object sender, EventArgs e)
        {
            MySqlAsmObjs obj = new MySqlAsmObjs();

            obj.Pr_sh_name = ddl_Asset_product_type_ad.SelectedItem.Value;
            MysqlAsMDBCS ABC = new MysqlAsMDBCS();
            DataTable    dt  = ABC._load_Asset_Short_name(obj);

            if (dt.Rows.Count > 0)
            {
                txt_assetNew_Number.Text = "KPCL/" + dt.Rows[0]["pr_type_sh_Name"].ToString() + "/";
            }
        }
Exemplo n.º 2
0
        public void _load_products_ddl()
        {
            MysqlAsMDBCS ABC = new MysqlAsMDBCS();
            DataTable    dt  = ABC._load_Asset_Products();

            ddl_Asset_product_ad.DataSource     = dt;
            ddl_Asset_product_ad.DataTextField  = "pr_Name";
            ddl_Asset_product_ad.DataValueField = "pr_id";
            ddl_Asset_product_ad.DataBind();
            ddl_Asset_product_ad.Items.Insert(0, new ListItem("Select One", "0"));
            if (dt.Rows.Count > 0)
            {
                foreach (DataRow row in dt.Rows)
                {
                    desktop_hidden_value.Value  = dt.Rows[0]["pr_id"].ToString();
                    Printers_hidden_value.Value = dt.Rows[2]["pr_id"].ToString();
                    Laptop_hidden_value.Value   = dt.Rows[1]["pr_id"].ToString();
                }
            }
        }