コード例 #1
0
        public static List <GetList> BindSubReport(string drpreporttext)
        {
            try
            {
                InventoryServiceClient lclsservice = new InventoryServiceClient();
                List <GetList>         lstLookUp   = new List <GetList>();

                if (drpreporttext != "0")
                {
                    if (drpreporttext == "Usage")
                    {
                        lstLookUp = lclsservice.GetList("Usage", "SubType", "Add").ToList();
                    }
                    else if (drpreporttext == "Cumulative Usage")
                    {
                        lstLookUp = lclsservice.GetList("Cumulative", "SubType", "Add").ToList();
                    }
                }
                return(lstLookUp);
            }
            catch (Exception ex)
            {
                return(null);
            }
        }
コード例 #2
0
 public void BindStatus(string mode)
 {
     try
     {
         List <GetList> lstLookUp = new List <GetList>();
         lstLookUp = lclsservice.GetList("Transfer", "Status", mode).ToList();
         drpStatussearch.DataSource     = lstLookUp;
         drpStatussearch.DataTextField  = "InvenValue";
         drpStatussearch.DataValueField = "InvenValue";
         drpStatussearch.DataBind();
         drpStatussearch.Items.FindByText(StatusPendingTransfer).Selected = true;
     }
     catch (Exception ex)
     {
         ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", Constant.TransferInErrorMessage.Replace("<<TransferInDescription>>", ex.Message), true);
     }
 }
コード例 #3
0
 public void BindReport(string Mode)
 {
     try
     {
         List <GetList> lstLookUp = new List <GetList>();
         lstLookUp                = lclsservice.GetList("Report", "Type", Mode).ToList();
         drpreport.DataSource     = lstLookUp;
         drpreport.DataTextField  = "InvenValue";
         drpreport.DataValueField = "InvenValue";
         ListItem lst = new ListItem();
         lst.Value = "0";
         lst.Text  = "--Select--";
         drpreport.DataBind();
         drpreport.Items.Insert(0, lst);
         drpreport.SelectedIndex = 0;
     }
     catch (Exception ex)
     {
         ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", Constant.ReportErrorMessage.Replace("<<Report>>", ex.Message), true);
     }
 }