protected void BtnUpdate_Click(object sender, EventArgs e)
        {
            try
            {
                A2ZSERVICETYPEDTO UpDTO = new A2ZSERVICETYPEDTO();
                UpDTO.ServiceType = Converter.GetSmallInteger(txtcode.Text);
                UpDTO.ServiceName = Converter.GetString(txtDescription.Text);

                int roweffect = A2ZSERVICETYPEDTO.UpdateInformation(UpDTO);
                if (roweffect > 0)
                {
                    dropdown();
                    clearinfo();
                    //     ddlNature.SelectedValue = "-Select-";
                    BtnSubmit.Visible = true;
                    BtnUpdate.Visible = false;
                    gvDetail();
                    txtcode.Focus();
                }
            }
            catch (Exception ex)
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "scriptkey", "<script>alert('System Error.BtnUpdate_Click Problem');</script>");
                throw ex;
            }
        }
        protected void ddlServiceType_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                if (ddlServiceType.SelectedValue == "-Select-")
                {
                    txtcode.Focus();
                    txtcode.Text        = string.Empty;
                    txtDescription.Text = string.Empty;
                    BtnSubmit.Visible   = true;
                    BtnUpdate.Visible   = false;
                }


                if (ddlServiceType.SelectedValue != "-Select-")
                {
                    Int16             MainCode = Converter.GetSmallInteger(ddlServiceType.SelectedValue);
                    A2ZSERVICETYPEDTO getDTO   = (A2ZSERVICETYPEDTO.GetInformation(MainCode));
                    if (getDTO.ServiceType > 0)
                    {
                        txtcode.Text        = Converter.GetString(getDTO.ServiceType);
                        txtDescription.Text = Converter.GetString(getDTO.ServiceName);
                        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)
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "scriptkey", "<script>alert('System Error.ddlServiceType_SelectedIndexChanged Problem');</script>");
                //throw ex;
            }
        }
        protected void BtnSubmit_Click(object sender, EventArgs e)
        {
            try
            {
                A2ZSERVICETYPEDTO objDTO = new A2ZSERVICETYPEDTO();

                objDTO.ServiceType = Converter.GetSmallInteger(txtcode.Text);
                objDTO.ServiceName = Converter.GetString(txtDescription.Text);

                int roweffect = A2ZSERVICETYPEDTO.InsertInformation(objDTO);
                if (roweffect > 0)
                {
                    txtcode.Focus();
                    clearinfo();
                    dropdown();
                    gvDetail();
                }
            }
            catch (Exception ex)
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "scriptkey", "<script>alert('System Error.BtnSubmit_Click Problem');</script>");
                throw ex;
            }
        }