Ejemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        
 //       this.cmbPdLine.InnerDropDownList.Load += new EventHandler(cmbPdLine_Load);
        this.ddlDescr.InnerDropDownList.Load += new EventHandler(ddlDescr_Load);
        iPAKitLoc = (IPAKitLoc)ServiceAgent.getInstance().GetMaintainObjectByName<IPAKitLoc>(WebConstant.PAKITLOCMAITAIN);
        if (!IsPostBack)
        {
            pmtMessage1 = this.GetLocalResourceObject(Pre + "_pmtMessage1").ToString();
            pmtMessage2 = this.GetLocalResourceObject(Pre + "_pmtMessage2").ToString();
            pmtMessage3 = this.GetLocalResourceObject(Pre + "_pmtMessage3").ToString();
            pmtMessage4 = this.GetLocalResourceObject(Pre + "_pmtMessage4").ToString();
            pmtMessage5 = this.GetLocalResourceObject(Pre + "_pmtMessage5").ToString();
            pmtMessage6 = this.GetLocalResourceObject(Pre + "_pmtMessage6").ToString();
            pmtMessage7 = this.GetLocalResourceObject(Pre + "_pmtMessage7").ToString();
            pmtMessage8 = this.GetLocalResourceObject(Pre + "_pmtMessage8").ToString();
            pmtMessage9 = this.GetLocalResourceObject(Pre + "_pmtMessage9").ToString();
            pmtMessage10 = this.GetLocalResourceObject(Pre+"_pmtMessage10").ToString();
            userName = Master.userInfo.UserId;
            this.HiddenUserName.Value = userName;
            initLabel();
    //        string pdline = this.cmbPdLine.InnerDropDownList.SelectedValue.Trim();
            List<PAKitLocDef> gradeLst = null;
            
            bindTable(gradeLst, DEFAULT_ROWS);
        }
        ScriptManager.RegisterStartupScript(this.updatePanel, typeof(System.Object), "InitControl", "initContorls();", true);
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            ipakitloc = ServiceAgent.getInstance().GetMaintainObjectByName<IPAKitLoc>(WebConstant.PAKITLOCMAITAIN);

            if (!this.IsPostBack)
            {
                if (isPercentage)
                {
                    if (Convert.ToInt32(width) > 100)
                    {
                        this.ddlTypeDescr.Width = Unit.Percentage(100);
                    }
                    else
                    {
                        this.ddlTypeDescr.Width = Unit.Percentage(Convert.ToDouble(width));
                    }
                }
                else
                {
                    this.ddlTypeDescr.Width = Unit.Parse(width);
                }

                this.ddlTypeDescr.CssClass = cssClass;
                this.ddlTypeDescr.Enabled = enabled;

                if (enabled)
                {
                    initCustomer();

                }
                else
                {
                    this.ddlTypeDescr.Items.Add(new ListItem("", ""));
                }
            }
        }
        catch (FisException ex)
        {
            showCmbErrorMessage(ex.mErrmsg);
        }
        catch (Exception ex)
        {
            showCmbErrorMessage(ex.Message);
        }
    }
    public void initCustomer(string descr)
    {
        ipr = ServiceAgent.getInstance().GetMaintainObjectByName<IPAKitLoc>(WebConstant.PAKITLOCMAITAIN);
        if (ipr != null)
        {
            IList<string> lstPAK = null;

            lstPAK = ipr.FindCodeByFamily(descr);

            Console.Write(lstPAK.Count);
            if (lstPAK != null && lstPAK.Count != 0)
            {
                initControl(lstPAK);
            }
            else
            {
                initControl(null);
            }
        }
        else
        {
            initControl(null);
        }
    }
    public void initCustomer(string descr)
    {
        ipakitloc = ServiceAgent.getInstance().GetMaintainObjectByName<IPAKitLoc>(WebConstant.PAKITLOCMAITAIN);
        if (ipakitloc != null)
        {
            IList<string> lstPAK = null;
            
            lstPAK = ipakitloc.GetPartNoByTypeDescr(descr);

            Console.Write(lstPAK.Count);
            if (lstPAK != null && lstPAK.Count != 0)
            {
                initControl(lstPAK);
            }
            else
            {
                initControl(null);
            }
        }
        else
        {
            initControl(null);
        }
    }