Beispiel #1
0
 public void BindCategory(string mode)
 {
     try
     {
         InventoryServiceClient         lclsservice = new InventoryServiceClient();
         List <GetCatagoryByFacilityID> lstcategory = new List <GetCatagoryByFacilityID>();
         BALEndingInventory             lstEndInv   = new BALEndingInventory();
         if (mode == "Add")
         {
             lstEndInv.FacilityID = Convert.ToInt64(drpTransFrom.SelectedValue);
             lstcategory          = lclsservice.GetCatagoryByFacilityID(lstEndInv).ToList();
         }
         else
         {
             lstcategory = lclsservice.GetCatagoryByFacilityID(lstEndInv).ToList();
         }
         drpItemCategory.DataSource     = lstcategory;
         drpItemCategory.DataValueField = "CategoryID";
         drpItemCategory.DataTextField  = "CategoryName";
         drpItemCategory.DataBind();
         ListItem lst = new ListItem();
         lst.Value = "0";
         lst.Text  = "Select";
         drpItemCategory.Items.Insert(0, lst);
         drpItemCategory.SelectedIndex = 0;
     }
     catch (Exception ex)
     {
         ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", Constant.ServiceRequestPOErrorMessage.Replace("<<ServiceRequestPO>>", ex.Message.ToString()), true);
     }
 }