示例#1
0
        protected void txtGrpCode_TextChanged(object sender, EventArgs e)
        {
            try
            {
                if (txtGrpCode.Text != string.Empty)
                {
                    int         code   = Converter.GetInteger(txtGrpCode.Text);
                    A2ZGROUPDTO getDTO = (A2ZGROUPDTO.GetInformation(code));
                    if (getDTO.GrpCode > 0)
                    {
                        ddlGroup.SelectedValue = Converter.GetString(getDTO.GrpCode);
                        hdnGrpCode.Text        = Converter.GetString(getDTO.GrpCode);

                        clearInfo();
                        SubGroupDropdown();

                        txtSubGrpDescription.Focus();
                    }
                    else
                    {
                        txtGrpCode.Text = string.Empty;
                        txtGrpCode.Focus();
                        ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Invalid Group Code');", true);
                        return;
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
示例#2
0
        protected void ddlGroup_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                if (ddlGroup.SelectedIndex != 0)
                {
                    int         code   = Converter.GetInteger(ddlGroup.SelectedValue);
                    A2ZGROUPDTO getDTO = (A2ZGROUPDTO.GetInformation(code));
                    if (getDTO.GrpCode > 0)
                    {
                        txtGrpCode.Text = Converter.GetString(getDTO.GrpCode);
                        hdnGrpCode.Text = Converter.GetString(getDTO.GrpCode);
                        SubGroupDropdown();


                        txtSubGrpDescription.Focus();
                        clearInfo();
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
示例#3
0
        protected void ddlGroup_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (ddlGroup.SelectedValue == "-Select-")
            {
                clearInfo();
                ddlGroup.Focus();
            }

            try
            {
                if (ddlGroup.SelectedValue != "-Select-")
                {
                    int         code   = Converter.GetInteger(ddlGroup.SelectedValue);
                    A2ZGROUPDTO getDTO = (A2ZGROUPDTO.GetInformation(code));
                    if (getDTO.GrpCode > 0)
                    {
                        hdnGrpCode.Text = Converter.GetString(getDTO.GrpCode);

                        txtDescription.Text = Converter.GetString(getDTO.GrpDescription);
                        txtDescription.Focus();
                        BtnSubmit.Visible = false;
                        BtnUpdate.Visible = true;
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
示例#4
0
 protected void ddlGroup_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         if (ddlGroup.SelectedValue != "-Select-")
         {
             SubgroupDropdown();
             int         code   = Converter.GetInteger(ddlGroup.SelectedValue);
             A2ZGROUPDTO getDTO = (A2ZGROUPDTO.GetInformation(code));
             if (getDTO.GrpCode > 0)
             {
                 txtGrpCode.Text = Converter.GetString(getDTO.GrpCode);
                 hdnGrpCode.Text = Converter.GetString(getDTO.GrpCode);
             }
         }
         else
         {
             txtGrpCode.Text = string.Empty;
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
        protected void ddlGroup_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                if (ddlGroup.SelectedValue != "-Select-")
                {
                    //ddlItemType.SelectedIndex = 0;
                    //ddlItemNo.SelectedIndex = 0;
                    BtnSubmit.Visible            = true;
                    BtnUpdate.Visible            = false;
                    ddlUnitMeasure.SelectedIndex = 0;
                    txtItemDesc.Text             = string.Empty;
                    txtReorderLvl.Text           = string.Empty;

                    SubgroupDropdown();
                    int         code   = Converter.GetInteger(ddlGroup.SelectedValue);
                    A2ZGROUPDTO getDTO = (A2ZGROUPDTO.GetInformation(code));
                    if (getDTO.GrpCode > 0)
                    {
                        txtGrpCode.Text = Converter.GetString(getDTO.GrpCode);
                        hdnGrpCode.Text = Converter.GetString(getDTO.GrpCode);
                    }
                }
                else
                {
                    txtGrpCode.Text = string.Empty;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
示例#6
0
        protected void BtnSubmit_Click(object sender, EventArgs e)
        {
            try
            {
                if (txtDescription.Text != string.Empty)
                {
                    gvDetail();
                    gvDetailInfo.Visible = false;

                    int totrec = gvDetailInfo.Rows.Count;

                    int lastGrpCode = (totrec + 1);


                    if (lastGrpCode < 10)
                    {
                        hdnGrpCode.Text = Converter.GetString("0" + lastGrpCode);
                    }

                    A2ZGROUPDTO objDTO = new A2ZGROUPDTO();

                    objDTO.GrpCode = Converter.GetInteger(hdnGrpCode.Text);

                    objDTO.GrpDescription = Converter.GetString(txtDescription.Text);

                    int roweffect = A2ZGROUPDTO.InsertInformation(objDTO);
                    if (roweffect > 0)
                    {
                        DivisionDropdown();
                        clearInfo();
                        BtnUpdate.Visible = false;
                        BtnSubmit.Visible = true;
                        gvDetail();
                        gvDetailInfo.Visible = false;
                        txtDescription.Text  = string.Empty;
                        txtDescription.Focus();
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
示例#7
0
        protected void BtnUpdate_Click(object sender, EventArgs e)
        {
            if (ddlGroup.SelectedValue != "-Select-")
            {
                A2ZGROUPDTO UpDTO = new A2ZGROUPDTO();
                UpDTO.GrpCode = Converter.GetInteger(hdnGrpCode.Text);

                UpDTO.GrpDescription = Converter.GetString(txtDescription.Text);
                int roweffect = A2ZGROUPDTO.UpdateInformation(UpDTO);
                if (roweffect > 0)
                {
                    DivisionDropdown();
                    clearInfo();
                    BtnUpdate.Visible = false;
                    BtnSubmit.Visible = true;
                    gvDetail();
                    gvDetailInfo.Visible = false;
                    txtDescription.Text  = string.Empty;
                    txtDescription.Focus();
                }
            }
        }