Exemplo n.º 1
0
        private void GVTransLocFill()
        {
            DataSet ds = new DataSet();

            try
            {
                SqlParameter[] param =
                {
                    new SqlParameter("@DealerCode",      SqlDbType.Char),
                    new SqlParameter("@PartsLocCode",    SqlDbType.VarChar),
                    new SqlParameter("@PartsSubLocCode", SqlDbType.VarChar)
                };
                param[0].Value = Session["DealerCode"].ToString();
                param[1].Value = txtPartLocationCode.Text.Trim();
                param[2].Value = txtSubLocationCode.Text.Trim();

                ds = SysFunc.SP_Spare_Get_PartsTransLocation(param);

                GVTransLocation.DataSource = ds.Tables[0];
                GVTransLocation.DataBind();
            }
            catch (Exception ex)
            {
                LbErr.Text = ex.Message;
            }
        }