Example #1
0
        protected void ddlCurrency_SelectedIndexChanged(object sender, EventArgs e)
        {
            int           location = Converter.GetInteger(ddlLocation.SelectedValue);
            int           currency = Converter.GetInteger(ddlCurrency.SelectedValue);
            A2ZINVCTRLDTO getDTO   = (A2ZINVCTRLDTO.GetInformation(location, currency));

            if (getDTO.Location > 0)
            {
                ddlCurrency.SelectedIndex = 0;
                ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Record Already in File');", true);
                return;
            }
        }
Example #2
0
        protected void ddlCurrency_SelectedIndexChanged(object sender, EventArgs e)
        {
            int           location = Converter.GetInteger(ddlLocation.SelectedValue);
            int           currency = Converter.GetInteger(ddlCurrency.SelectedValue);
            A2ZINVCTRLDTO getDTO   = (A2ZINVCTRLDTO.GetInformation(location, currency));

            if (getDTO.Location > 0)
            {
                Int64       accno1  = Converter.GetLong(getDTO.GoldLedger);
                A2ZPARTYDTO get1DTO = (A2ZPARTYDTO.GetAccNoInformation(accno1));

                if (get1DTO.PartyCode > 0)
                {
                    ddlCurrency1.SelectedValue = Converter.GetString(get1DTO.PartyCurrencyCode);
                    MetalDropdown();
                    ddlMetalLedger.SelectedValue = Converter.GetString(getDTO.GoldLedger);
                }

                Int64 accno2 = Converter.GetLong(getDTO.CarryingLedger);
                if (accno2 != 0)
                {
                    A2ZPARTYDTO get2DTO = (A2ZPARTYDTO.GetAccNoInformation(accno2));

                    if (get2DTO.PartyCode > 0)
                    {
                        ddlCurrency2.SelectedValue = Converter.GetString(get2DTO.PartyCurrencyCode);
                        CarryingDropdown();
                        ddlCarryingLedger.SelectedValue = Converter.GetString(getDTO.CarryingLedger);
                    }
                }



                Int64       accno3  = Converter.GetLong(getDTO.MakingLedger);
                A2ZPARTYDTO get3DTO = (A2ZPARTYDTO.GetAccNoInformation(accno3));

                if (get3DTO.PartyCode > 0)
                {
                    ddlCurrency3.SelectedValue = Converter.GetString(get3DTO.PartyCurrencyCode);
                    MakingDropdown();
                    ddlMakingLedger.SelectedValue = Converter.GetString(getDTO.MakingLedger);
                }



                Int64       accno4  = Converter.GetLong(getDTO.StoneLedger);
                A2ZPARTYDTO get4DTO = (A2ZPARTYDTO.GetAccNoInformation(accno4));

                if (get4DTO.PartyCode > 0)
                {
                    ddlCurrency4.SelectedValue = Converter.GetString(get4DTO.PartyCurrencyCode);
                    StoneDropdown();
                    ddlStoneLedger.SelectedValue = Converter.GetString(getDTO.StoneLedger);
                }
            }
            else
            {
                ddlCurrency.SelectedIndex = 0;
                ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Record Not in File');", true);
                return;
            }
        }