示例#1
0
    protected void AddSubmit_Click(object sender, EventArgs e)
    {
        string str0 = CustomerID.Text.ToString();
        string str1 = CreateDate.Text.ToString();
        string str2 = SalesOrderID.Text.ToString();
        string str3 = Description.Value.ToString();

        SalesRecord s = new SalesRecord();

        s.CreateDate   = str1;
        s.CustomerID   = str0;
        s.Description  = str3;
        s.SalesOrderID = str2;
        s.PlatformID   = int.Parse(Platform.SelectedValue.ToString());
        s.UserName     = getUserName();

        Leyp.SQLServerDAL.Sales.SalesRecordDAL bl = new Leyp.SQLServerDAL.Sales.SalesRecordDAL();
        bl.insertNewEntity(s);


        CustomerID.Text   = "";
        CreateDate.Text   = "";
        SalesOrderID.Text = "";

        Jscript.CloseWindowReturnValues("顾客ID:" + str0);
    }
示例#2
0
    protected void init()
    {
        string        AuditingId = Request.QueryString["AuditingId"].ToString();
        StringBuilder sb         = new StringBuilder();

        string[] a = AuditingId.Split('#');
        Leyp.SQLServerDAL.Sales.SalesRecordDAL bl = new Leyp.SQLServerDAL.Sales.SalesRecordDAL();
        int num = 0;

        for (int i = 0; i < a.Length; i++)
        {
            if (bl.deleteEitity(int.Parse(a[i]), getUserName()))//删除成功
            {
                num++;
            }
            else
            {
                sb.Append("记录号:" + a[i] + " 可能不是您记的记录 <br/>");
            }
        }
        sb.Append("成功删除 " + num + "条");
        Response.Write(sb.ToString());
    }