public void FillDDLSupplier()
    {
        try
        {
            using (BLL_PURC_Purchase objTechService = new BLL_PURC_Purchase())
            {
                BLL_Infra_VesselLib objVsl = new BLL_Infra_VesselLib();
                string ReqCode             = "";

                //if (!string.IsNullOrEmpty(Session["AttRequistionCode"].ToString()))
                //{
                //    ReqCode = Session["AttRequistionCode"].ToString();
                //}
                DataSet SupplDs = objTechService.GetSuupplierHavingAttachment(ReqCode);
                DDLSupplier.DataSource     = SupplDs.Tables[0];
                DDLSupplier.DataTextField  = "SHORT_NAME";
                DDLSupplier.DataValueField = "SUPPLIER";
                DDLSupplier.DataBind();

                DataTable CatDt = objTechService.GetCategory_FileType();
                DDLCategory.DataSource     = CatDt;
                DDLCategory.DataTextField  = "Description";
                DDLCategory.DataValueField = "code";
                DDLCategory.DataBind();
            }
        }
        catch (Exception ex)
        {
        }
    }
示例#2
0
    private void BindSupplier()
    {
        SqlParameter[] arrParam = new SqlParameter[1];
        arrParam[0] = new SqlParameter("@Action", "SELECT");
        DataSet DSSupplier = SqlHelper.ExecuteDataset(Connection.connect(), CommandType.StoredProcedure, "SP_Supplier_CRUD", arrParam);

        if (DSSupplier.Tables[0].Rows.Count > 0)
        {
            DDLSupplier.DataSource     = DSSupplier.Tables[0];
            DDLSupplier.DataTextField  = "Name";
            DDLSupplier.DataValueField = "ID";
            DDLSupplier.DataBind();
            DDLSupplier.Items.Insert(0, new ListItem("Select", "0"));
        }
    }
 private void BindSupplier()
 {
     try
     {
         SqlParameter[] arrParam = new SqlParameter[1];
         arrParam[0] = new SqlParameter("@Action", "SELECT");
         DSRecords   = SqlHelper.ExecuteDataset(Connection.connect(), CommandType.StoredProcedure, "SP_Supplier_CRUD", arrParam);
         if (DSRecords.Tables[0].Rows.Count > 0)
         {
             DDLSupplier.DataSource     = DSRecords.Tables[0];
             DDLSupplier.DataTextField  = "Name";
             DDLSupplier.DataValueField = "ID";
             DDLSupplier.DataBind();
             DDLSupplier.Items.Insert(0, new System.Web.UI.WebControls.ListItem("-Select-", "0"));
         }
     }
     catch (Exception ex)
     {
         ShowMessage(ex.Message, MessageType.Error);
     }
 }
示例#4
0
 protected void BindSupplierDDLForQuotation()
 {
     try
     {
         using (BLL_PURC_Purchase objTechService = new BLL_PURC_Purchase())
         {
             DataTable dtSuppForQuatation = objTechService.GetSupplierForQuatation(Request.QueryString["Requisitioncode"].ToString(), Request.QueryString["Vessel_Code"].ToString(), Request.QueryString["Document_Code"].ToString());
             //dtSuppForQuatation.DefaultView.RowFilter = "REQUISITION_CODE ='" + Request.QueryString["Requisitioncode"].ToString() + "'";
             DDLSupplier.DataSource     = dtSuppForQuatation.DefaultView;
             DDLSupplier.DataTextField  = "SHORT_NAME";
             DDLSupplier.DataValueField = "QUOTATION_SUPPLIER";
             DDLSupplier.DataBind();
             ViewState["QuotationCode"] = dtSuppForQuatation.DefaultView[0][0].ToString();
         }
     }
     catch (Exception ex)
     {
         //.WriteError(this.GetType().Name.ToString(), System.Reflection.MethodBase.GetCurrentMethod().Name.ToString(), ex);
     }
     finally
     {
     }
 }