示例#1
0
        protected void ibtn_brand_asm_Click(object sender, ImageClickEventArgs e)
        {
            //  btn_product_type_Save.Text = "Update";
            ImageButton btn      = (ImageButton)sender;
            GridViewRow gvr      = (GridViewRow)btn.NamingContainer;
            HiddenField hf_brand = (HiddenField)gvr.FindControl("hf_brand_id");
            HiddenField hf_val   = new HiddenField();

            hf_val.Value = hf_brand.Value;
            CPU_Details cds = new CPU_Details();

            cds.Cpu_brand_id = Convert.ToInt32(hf_val.Value);
            AM_DB_Tranactions ad = new AM_DB_Tranactions();
            DataTable         dt = ad.view_Cpu_brand_edit_dispaly(cds);

            if (dt.Rows.Count > 0)
            {
                lbl_brand_id.Text        = dt.Rows[0]["bm_id"].ToString();
                ViewState["bm_brand_id"] = dt.Rows[0]["bm_id"].ToString();
                txt_product_amms.Text    = dt.Rows[0]["bm_brand"].ToString();
            }
            else
            {
                txt_product_amms.Text = string.Empty;
            }
        }
示例#2
0
        protected void ibtn_brand_model_asm_Click(object sender, ImageClickEventArgs e)
        {
            _load_brand_model_grid();
            btn_Brand_save_amms.Text = "Update";
            ImageButton btn1           = (ImageButton)sender;
            GridViewRow gvr1           = (GridViewRow)btn1.NamingContainer;
            HiddenField hf_brand_model = (HiddenField)gvr1.FindControl("hf_brand_model_name");
            //   Label lb1 = (Label)gvr1.FindControl("lbl_brand_model_asm");
            HiddenField hf_model = new HiddenField();

            hf_model.Value = hf_brand_model.Value;
            CPU_Details cds = new CPU_Details();

            cds.Cpu_model_make = hf_model.Value;
            AM_DB_Tranactions ad = new AM_DB_Tranactions();
            DataTable         dt = ad.view_Cpu_brand_model_edit_dispaly(cds);

            if (dt.Rows.Count > 0)
            {
                ddl_product_type_amms.SelectedItem.Value = dt.Rows[0]["bbm_brand_id"].ToString();
                txt_Brand_amms.Text = dt.Rows[0]["bbm_model"].ToString();
            }
            else
            {
                txt_Brand_amms.Text = string.Empty;
            }
        }
示例#3
0
        protected void ibtn_products_asm_Click(object sender, ImageClickEventArgs e)
        {
            btn_product_save_amms.Text = "Update";
            ImageButton btn       = (ImageButton)sender;
            GridViewRow gvr       = (GridViewRow)btn.NamingContainer;
            HiddenField hiduno    = (HiddenField)gvr.FindControl("hf_type_name");
            HiddenField hfieldupd = new HiddenField();

            hfieldupd.Value = hiduno.Value;
            AM_DB_Tranactions ad = new AM_DB_Tranactions();
            DataTable         dt = ad.view_Asset_type_edit_dispaly(hiduno.Value);

            if (dt.Rows.Count > 0)
            {
                foreach (DataRow row in dt.Rows)
                {
                    lbl_id.Text           = dt.Rows[0]["type_id"].ToString();
                    txt_product_amms.Text = dt.Rows[0]["type_name"].ToString();
                }
            }
            else
            {
                txt_product_amms.Text = string.Empty;
            }
        }
示例#4
0
        private void loadddl()
        {
            AM_DB_Tranactions  ad  = new AM_DB_Tranactions();
            List <CPU_Details> aha = new List <CPU_Details>();

            aha = ad.hia();
            DropDownList1.DataSource     = aha;
            DropDownList1.DataTextField  = "CPU_IP_ADDRESS";
            DropDownList1.DataValueField = "Cpu_brand_id";
            DropDownList1.DataBind();
        }