예제 #1
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        string strUsername = Request.Cookies["Speedo"]["UserName"].ToString();

        using (SqlConnection cn = new SqlConnection(clsSpeedo.SpeedoConnectionString))
        {
            using (SqlCommand cmd = cn.CreateCommand())
            {
                cmd.CommandText = "INSERT INTO Portal.JournalReviewer VALUES(@username,@happrover)";
                cmd.Parameters.Add(new SqlParameter("@username", ddlEmployee.SelectedValue.ToString()));
                cmd.Parameters.Add(new SqlParameter("@happrover", ddlReviewer.SelectedValue.ToString()));
                cn.Open();
                cmd.ExecuteNonQuery();
                cn.Close();

                LoadItems();


                ddlEmployee.DataSource     = EmployeeReviewer.DSLEmployeeList();
                ddlEmployee.DataValueField = "pvalue";
                ddlEmployee.DataTextField  = "ptext";
                ddlEmployee.DataBind();
            }
        }
    }
예제 #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            ddlReviewer.DataSource     = clsModuleApprover.DSLApprover("EJS", "1");
            ddlReviewer.DataValueField = "pvalue";
            ddlReviewer.DataTextField  = "ptext";
            ddlReviewer.DataBind();

            lblReviewer.Text = ddlReviewer.SelectedValue.ToString();

            ddlEmployee.DataSource     = EmployeeReviewer.DSLEmployeeList();
            ddlEmployee.DataValueField = "pvalue";
            ddlEmployee.DataTextField  = "ptext";
            ddlEmployee.DataBind();

            LoadItems();
        }
    }