示例#1
0
        protected void BtnUpdate_Click(object sender, EventArgs e)
        {
            A2ZLSECURITYDTO UpDTO = new A2ZLSECURITYDTO();

            UpDTO.LSecurityCode        = Converter.GetSmallInteger(txtcode.Text);
            UpDTO.LSecurityDescription = Converter.GetString(txtDescription.Text);

            int roweffect = A2ZLSECURITYDTO.UpdateInformation(UpDTO);

            if (roweffect > 0)
            {
                dropdown();
                clearinfo();
                //    ddlSecurity.SelectedValue = "-Select-";
                BtnSubmit.Visible = true;
                BtnUpdate.Visible = false;
                txtcode.Focus();
                gvDetail();
            }
        }
示例#2
0
        protected void ddlSecurity_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (ddlSecurity.SelectedValue == "-Select-")
            {
                txtcode.Focus();
                txtcode.Text        = string.Empty;
                txtDescription.Text = string.Empty;
                BtnSubmit.Visible   = true;
                BtnUpdate.Visible   = false;
            }

            try
            {
                if (ddlSecurity.SelectedValue != "-Select-")
                {
                    Int16           MainCode = Converter.GetSmallInteger(ddlSecurity.SelectedValue);
                    A2ZLSECURITYDTO getDTO   = (A2ZLSECURITYDTO.GetInformation(MainCode));
                    if (getDTO.LSecurityCode > 0)
                    {
                        txtcode.Text        = Converter.GetString(getDTO.LSecurityCode);
                        txtDescription.Text = Converter.GetString(getDTO.LSecurityDescription);
                        BtnSubmit.Visible   = false;
                        BtnUpdate.Visible   = true;
                        txtDescription.Focus();
                    }
                    else
                    {
                        txtcode.Focus();
                        txtcode.Text        = string.Empty;
                        txtDescription.Text = string.Empty;
                        BtnSubmit.Visible   = true;
                        BtnUpdate.Visible   = false;
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
示例#3
0
        protected void BtnSubmit_Click(object sender, EventArgs e)
        {
            try
            {
                A2ZLSECURITYDTO objDTO = new A2ZLSECURITYDTO();

                objDTO.LSecurityCode        = Converter.GetSmallInteger(txtcode.Text);
                objDTO.LSecurityDescription = Converter.GetString(txtDescription.Text);

                int roweffect = A2ZLSECURITYDTO.InsertInformation(objDTO);
                if (roweffect > 0)
                {
                    txtcode.Focus();
                    clearinfo();
                    dropdown();
                    gvDetail();
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }