示例#1
0
        private void LoadData()
        {
            string ccode = ddlCustomer.SelectedValue;

            ddlAcctof.SelectedIndex = ddlCustomer.SelectedIndex;
            //txtCustomerName.Text = sysFuns.GetCustomerName(ccode, Session["DealerCode"].ToString());

            ddlAcctof.Enabled       = true;
            txtRegDate.Enabled      = true;
            txtRegNo.Enabled        = true;
            ddlVersion.Enabled      = true;
            txtEngineNo.Enabled     = true;
            ddlProduct.Enabled      = true;
            txtChassisNo.Enabled    = true;
            ddlColor.Enabled        = true;
            txtInvDate.Enabled      = true;
            ddlInsCo.Enabled        = true;
            txtWBNo.Enabled         = true;
            txtPolicyNo.Enabled     = true;
            ddlBrand.Enabled        = true;
            btnDeleteInv.Enabled    = true;
            btnSaveInv.Enabled      = true;
            txtInvoiceNo.Enabled    = true;
            txtDeliveryDate.Enabled = true;

            SqlParameter[] param =
            {
                new SqlParameter("@DealerCode", SqlDbType.VarChar, 5),
                new SqlParameter("@CusCode",    SqlDbType.VarChar, 50)
            };

            param[0].Value       = Session["DealerCode"].ToString();
            param[1].Value       = sysFun.GetNullString(ccode);
            gvCustVeh.DataSource = sysFuns.FillDataSetOrEmptyRow("sp_2W_Service_CusVeh_Select", param);
            gvCustVeh.DataBind();
            gvCustVeh.Enabled = true;
        }
示例#2
0
        protected void cmbCustomerCode_TextChanged(object sender, EventArgs e)
        {
            string ccode = cmbCustomerCode.Text;

            txtCustomerName.Text = myFunc.GetCustomerName(ccode, Session["DealerCode"].ToString());

            cmbEndUser.Enabled    = true;
            dpRegDate.Enabled     = true;
            txtRegNo.Enabled      = true;
            txtVersion.Enabled    = true;
            txtEngNo.Enabled      = true;
            cmbProdCode.Enabled   = true;
            txtChassisNo.Enabled  = true;
            cmbColorCode.Enabled  = true;
            dpInvoiceDate.Enabled = true;
            cmbInsCode.Enabled    = true;
            txtInvoiceNo.Enabled  = true;
            txtPolicyNo.Enabled   = true;
            cmbBrand.Enabled      = true;
            btnDelete.Enabled     = false;
            btnSave.Enabled       = true;

            SqlParameter[] param =
            {
                new SqlParameter("@DealerCode", SqlDbType.VarChar, 5),
                new SqlParameter("@CusCode",    SqlDbType.VarChar, 50)
            };

            param[0].Value      = Session["DealerCode"].ToString();
            param[1].Value      = myFunc.GetNullString(cmbCustomerCode.Text.Trim());
            gvCVInfo.DataSource = myFunc.FillDataSetOrEmptyRow("sp_2W_Service_CusVeh_Select", param);
            gvCVInfo.DataBind();
            gvCVInfo.Enabled = true;

            lblMasg.Text = "New";
        }