ZhiceEdit.aspx.cs

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class ZhiceEdit : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            int intRowsIndex = 0;
            if (Request.QueryString["RowIndex_zhi"] != null)
            {
                intRowsIndex = int.Parse(Request.QueryString["RowIndex_zhi"].ToString());
                Hid_RowIndex.Value = intRowsIndex.ToString();

                DataSet ds_Zhice = new DataSet();
                Zhice zhice = new Zhice();
                ds_Zhice = zhice.GetDataSet("");
                Zhice_Name.Text = ds_Zhice.Tables["T_Zhice"].Rows[intRowsIndex]["Zhice_Name"].ToString();
            }
            String strCommand = "";
            if (Request.QueryString["Command"] != null)
            {
                strCommand = Request.QueryString["Command"].ToString();
                Hid_Command.Value = strCommand;
            }
        }
    }
    protected void butSave_Click(object sender, EventArgs e)
    {
        Zhice zhice = new Zhice();
        publicFunction pFunction = new publicFunction();
        if (Hid_Command.Value == "INSERT")
        {
            String strZhiceName = Zhice_Name.Text;
            String strZhiceCode = pFunction.GetChineseSpell(strZhiceName);
            zhice.Field_Zhice_Code = strZhiceCode;
            zhice.Field_Zhice_Name = strZhiceName;
            String strReturn = zhice.ZhiceInsert();
            if (strReturn.Contains("ok"))
            {
                Response.Redirect("ZhiceView.aspx");
            }
        }
        else if (Hid_Command.Value == "UPDATE")
        {
            String strZhiceName = Zhice_Name.Text;
            String strZhiceCode = pFunction.GetChineseSpell(strZhiceName);
            zhice.Field_Zhice_Code = strZhiceCode;
            zhice.Field_Zhice_Name = strZhiceName;
            zhice.RowIndex_zhi = int.Parse(Hid_RowIndex.Value);
            String strReturn = zhice.ZhiceUpdate();
后面还有 15 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。