public void FillComboData()
 {
     try
     {
         DS = Obj_IssueRegister.FillComboForReport(Convert.ToInt32(Session["UserID"].ToString()), out StrError);
         if (DS.Tables.Count > 0)
         {
             if (DS.Tables[0].Rows.Count > 0)
             {
                 ddlNo.DataSource     = DS.Tables[0];
                 ddlNo.DataTextField  = "IssueNo";
                 ddlNo.DataValueField = "#";
                 ddlNo.DataBind();
             }
             if (DS.Tables[1].Rows.Count > 0)
             {
                 ddlTo.DataSource     = DS.Tables[1];
                 ddlTo.DataTextField  = "Name";
                 ddlTo.DataValueField = "#";
                 ddlTo.DataBind();
             }
         }
         else
         {
             DS = null;
         }
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }
Example #2
0
 public void FillCombo()
 {
     try
     {
         DS = Obj_IssueRegister.FillComboForReport(Convert.ToInt32(Session["UserID"]), out StrError);
         {
             if (DS.Tables.Count > 0)
             {
                 if (DS.Tables[0].Rows.Count > 0)
                 {
                     ddlIssueNo.DataSource     = DS.Tables[0];
                     ddlIssueNo.DataTextField  = "IssueNo";
                     ddlIssueNo.DataValueField = "#";
                     ddlIssueNo.DataBind();
                 }
                 if (DS.Tables[1].Rows.Count > 0)
                 {
                     ddlEmp.DataSource     = DS.Tables[1];
                     ddlEmp.DataTextField  = "Name";
                     ddlEmp.DataValueField = "#";
                     ddlEmp.DataBind();
                 }
                 if (DS.Tables[4].Rows.Count > 0)
                 {
                     ddlItem.DataSource     = DS.Tables[4];
                     ddlItem.DataTextField  = "Item";
                     ddlItem.DataValueField = "#";
                     ddlItem.DataBind();
                 }
                 if (DS.Tables[5].Rows.Count > 0)
                 {
                     ddlLocation.DataSource     = DS.Tables[5];
                     ddlLocation.DataTextField  = "Cafeteria";
                     ddlLocation.DataValueField = "#";
                     ddlLocation.DataBind();
                 }
             }
             else
             {
                 DS = null;
             }
         }
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }