예제 #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         test = new konrad.CourierService();
         string[] st = { "1", "2", "3", "4", "5" };
         DropDownListStatus.DataSource = st;
         DropDownListStatus.DataBind();
     }
 }
        private void BindStatus()
        {
            DropDownListStatus.DataSource     = SPARInsightManagement.Web.Code.Status.GetStatusList();
            DropDownListStatus.DataTextField  = "Description";
            DropDownListStatus.DataValueField = "StatusId";
            DropDownListStatus.DataBind();

            if (DropDownListStatus.Items.Count > 1)
            {
                DropDownListStatus.Items.Insert(0, new ListItem("Please select", "0"));
            }
        }
        private void BindCustomDetail(int customDetailId)
        {
            InsightSupplierCustomDetail insightSupplierCustomDetail = InsightSupplierCustomDetail.GetInsightSupplierCustomDetailByInsightSupplierCustomDetailId(customDetailId);

            this.insightSupplierCustomDetailId = insightSupplierCustomDetail.InsightSupplierCustomDetailId;
            this.insightSupplierId             = insightSupplierCustomDetail.InsightSupplierId;
            DropDownListCustomType.ClearSelection();
            DropDownListCustomType.Items.FindByValue(insightSupplierCustomDetail.CustomTypeId.ToString()).Selected = true;
            DropDownListCustomFrequency.ClearSelection();
            DropDownListCustomFrequency.Items.FindByValue(insightSupplierCustomDetail.CustomFrequencyId.ToString()).Selected = true;
            DropDownListCustomResponsibility.ClearSelection();
            DropDownListCustomResponsibility.Items.FindByValue(insightSupplierCustomDetail.CustomResponsibilityId.ToString()).Selected = true;
            TextBoxDetail.Text     = insightSupplierCustomDetail.Detail;
            TextBoxSourceFile.Text = insightSupplierCustomDetail.SourceFile;
            DropDownListStatus.ClearSelection();
            DropDownListStatus.Items.FindByValue(insightSupplierCustomDetail.StatusId.ToString()).Selected = true;
        }
예제 #4
0
        private void BindStatus()
        {
            using (SqlConnection con = new SqlConnection(CS))
            {
                SqlCommand cmd = new SqlCommand("select * from Status", con);
                con.Open();
                SqlDataAdapter sda = new SqlDataAdapter(cmd);
                DataTable      dt  = new DataTable();
                sda.Fill(dt);

                if (dt.Rows.Count != 0)
                {
                    DropDownListStatus.DataSource     = dt;
                    DropDownListStatus.DataTextField  = "StatusName";
                    DropDownListStatus.DataValueField = "StatusId";
                    DropDownListStatus.DataBind();
                    DropDownListStatus.Items.Insert(0, new ListItem("-Select-", "0"));
                }
            }
        }
예제 #5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            using (DataClassesDatabaseDataContext db = new DataClassesDatabaseDataContext())
            {
                PenggunaLogin _pengguna = (PenggunaLogin)Session["PenggunaLogin"];

                DropDownListStatus.DataSource     = db.TBStatusTransaksis.ToArray();
                DropDownListStatus.DataValueField = "IDStatusTransaksi";
                DropDownListStatus.DataTextField  = "Nama";
                DropDownListStatus.DataBind();
                DropDownListStatus.Items.Insert(0, new ListItem {
                    Text = "-Semua Status-", Value = "0"
                });
                DropDownListStatus.SelectedValue = "5";

                ViewState["TanggalAwal"]  = Pengaturan.HariIni()[0];
                ViewState["TanggalAkhir"] = Pengaturan.HariIni()[1];

                LoadData();
            }
        }
    }