コード例 #1
0
 /// <summary>
 /// 删除,破坏四层架构需要更改。
 /// </summary>
 protected void DeleteButton_Click(object sender, EventArgs e)
 {
     int code = Convert.ToInt32(Page.Request.QueryString["code"]);
     SqlConnection sqlConn = new SqlConnection();
     sqlConn.ConnectionString = FunctionRule.GetConnectionString();
     HandMadeDAL hmd = new HandMadeDAL(sqlConn);
     hmd.UpVersionState(code);
     Response.Write("<script>window.close();</script>");
     Response.Redirect("FileTemplateVersionList.aspx?code=" + code.ToString());
 }
コード例 #2
0
    protected void FormView1_ItemUpdating(object sender, FormViewUpdateEventArgs e)
    {
        DropDownList ddlStatus   = (DropDownList)(FormView1.Row.FindControl("IsAvailabilityDropDownList"));
        DropDownList ddlSave     = (DropDownList)(FormView1.Row.FindControl("IsPigeonholeDropDownList"));
        DropDownList ddlWorkFlow = (DropDownList)(FormView1.Row.FindControl("DropDownList1"));

        if (ddlStatus.SelectedItem.Text == "有效")
        {
            int           code    = Int32.Parse(Page.Request.QueryString["Tempcode"]);
            SqlConnection sqlConn = new SqlConnection();
            sqlConn.ConnectionString = FunctionRule.GetConnectionString();
            HandMadeDAL hmd = new HandMadeDAL(sqlConn);
            hmd.UpVersionState(code);
        }
        e.NewValues["WorkFlowProcedureName"] = ddlWorkFlow.SelectedItem.Text;
        e.NewValues["IsPigeonhole"]          = ddlSave.SelectedItem.Text;
        e.NewValues["IsAvailability"]        = ddlStatus.SelectedItem.Text;
    }