请高手们帮帮忙,小弟急
代码在下载文件中
代码在下载文件中
解决方案 »
- Wmi 135 有点问题 会的指点 下
- 求教关于pictureBox中的Image的一些问题!
- C#如何实现Delphi里的SendMessage(Application.MainForm.ClientHandle, WM_MDIGETACTIVE, 0, 0);
- 请问连续存储文件的方法对于一个格式化好的空白存储卡
- .Net 2.0中的ListView.ItemMouseHover Event为什么只对第一列有效?是否为MS的Bug?
- 我用odbc建立了一个到excel文件的连接,excel中sheet1已经有内容了,但是连接里面表下面为什么还是空的阿?
- C# 筛选LIst对象数据,将筛选的数据填充到另一个list对象,急~~~
- 计算机基础问题,位操作。
- 关于计时器问题
- 求助 Try Catch的疑惑
- numeric(10,2)是7位整数,2位小数的意思吗
- C#获取了Post数据,如何处理Post数据?
using System;
using System.Collections.Generic;
using System.Text;namespace SJ.Search
{
public interface ICustomerInfo
{
CustomerInfo Customer
{ get;}
}
}
using System;
using System.Collections.Generic;
using System.Text;namespace SJ.Search
{
public class CustomerInfo
{
#region CustomerInfo private int _CustomerId;
private string _Customer;
private string _ShortName;
private string _CustomerCode;
private int _CustomerTypeId;
private int _CustomerStepId;
private int _RelationId;
private int _SourceId;
private int _VocationId;
private int _ScaleId;
private int _CreditId;
private int _EvaluateId;
private int _OperaterId;
private int _Father_Customer_Id;
private string _CreateBeginDate;
private string _CreateEndDate;
private string _UpdateBeginDate;
private string _UpdateEndDate;
#endregion #region CustomerInfo
public int CustomerId
{
set { _CustomerId = value; }
get { return _CustomerId; }
} public string Customer
{
set { _Customer = value; }
get { return _Customer; }
} public string CustomerCode
{
set { _CustomerCode = value; }
get { return _CustomerCode; }
} public string ShortName
{
set { _ShortName = value; }
get { return _ShortName; }
} public int CustomerTypeId
{
set { _CustomerTypeId = value; }
get { return _CustomerTypeId; }
} public int CustomerStepId
{
set { _CustomerStepId = value; }
get { return _CustomerStepId; }
} public int RelationId
{
set { _RelationId = value; }
get { return _RelationId; }
} public int SourceId
{
set { _SourceId = value; }
get { return _SourceId; }
} public int VocationId
{
set { _VocationId = value; }
get { return _VocationId; }
} public int ScaleId
{
set { _ScaleId = value; }
get { return _ScaleId; }
} public int CreditId
{
set { _CreditId = value; }
get { return _CreditId; }
} public int EvaluateId
{
set { _EvaluateId = value; }
get { return _EvaluateId; }
} public int OperaterId
{
set { _OperaterId = value; }
get { return _OperaterId; }
} public int Father_Customer_Id
{
set { _Father_Customer_Id = value; }
get { return _Father_Customer_Id; } } public string CreateBeginDate
{
set { _CreateBeginDate = value; }
get { return _CreateBeginDate; } } public string CreateEndDate
{
set { _CreateEndDate = value; }
get { return _CreateEndDate; } } public string UpdateBeginDate
{
set { _UpdateBeginDate = value; }
get { return _UpdateBeginDate; } } public string UpdateEndDate
{
set { _UpdateEndDate = value; }
get { return _UpdateEndDate; } } #endregion
}
}
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;
using SJ.DBUtility;
using SJ.Search;
public partial class Search_Customer : System.Web.UI.Page, SJ.Search.ICustomerInfo
{
private CustomerInfo _info; public CustomerInfo info
{
get { return _info; }
} protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
drpInit();
}
}
protected void drpInit()
{
DbFunc.drpBind(drpCustomerType, "CustomerType", "CustomerType", "CustomertypeId");
DbFunc.drpBind(drpCustomerStep, "CustomerStep", "CustomerStep", "CustomerStepId");
DbFunc.drpBind(drpAller, "User", "User", "UserId");
} public void btnSearch_Click(object sender, EventArgs e)
{
_info = new CustomerInfo(); _info.Customer = txtCustomer.Text.ToString();
_info.CustomerCode = txtCustomerCode.Text.ToString();
_info.CustomerStepId = Convert.ToInt32(drpCustomerStep.SelectedValue);
_info.CustomerTypeId = Convert.ToInt32(drpCustomerType.SelectedValue);
_info.ShortName = txtShortName.Text.ToString();
_info.CreateBeginDate = txtCreateBeginDate.Text.ToString();
_info.CreateEndDate = txtCreateEndDate.Text.ToString();
_info.UpdateBeginDate = txtUpdateBeginDate.Text.ToString();
_info.UpdateEndDate = txtUpdateEndDate.Text.ToString(); Server.Transfer("../Customer/Customer.aspx", true); }
}
{
//成员
int Add(int a, int b);
string Name { get;}
} public class test : demo
{
public int Add(int a, int b)
{ } public string Name
{
get { }
}
}
public CustomerInfo Customer
{ get _info;}
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;
using SJ.Search;
using SJ.ClassBase;
public partial class Customer_Customer : System.Web.UI.Page
{
protected static string strId; protected SJ.BLL.CustomerInfo bll = new SJ.BLL.CustomerInfo(); // CustomerInfo search = new CustomerInfo(); public static string strReturn = ""; protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{ Result(); gridBind(); hlkHigh.NavigateUrl = "~/Search/Customer.aspx";
}
}
private void Result()
{
CustomerInfo info = new CustomerInfo(); ICustomerInfo infoInterface; //实现该接口的页面
if (Context.Handler is ICustomerInfo)
{
infoInterface = (ICustomerInfo)Context.Handler;
info = infoInterface.Customer;
} Response.Write(info.Customer.ToString());
}
private void gridBind()
{
grvTable.DataSource = bll.GetList(" Flag=0"); grvTable.DataBind();
}
#region 绑定
protected void grvTable_RowDataBound(object sender, GridViewRowEventArgs e)
{
#region 自动编号列 if (e.Row.RowIndex == -1)
return;
int nIndex = grvTable.PageIndex * grvTable.PageSize + e.Row.RowIndex + 1; e.Row.Cells[0].Text = nIndex.ToString(); #endregion grvTableBind.bind("Customer", e); }
#endregion #region 删除
/// <summary>
/// 标记删除
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void grvTable_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
string ID = grvTable.DataKeys[e.RowIndex].Value.ToString(); bll.FlagDel(ID); gridBind();
}
/// <summary>
/// 删除
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnDel_Click(object sender, EventArgs e)
{
foreach (GridViewRow grw in grvTable.Rows)
{
CheckBox chk = (CheckBox)grw.FindControl("chkSelect");
if (chk.Checked)
{
string strId = grvTable.DataKeys[grw.RowIndex][0].ToString(); bll.FlagDel(strId);
}
}
gridBind();
}
#endregion #region 编辑
/// <summary>
/// 编辑
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void grvTable_RowEditing(object sender, GridViewEditEventArgs e)
{
strId = grvTable.DataKeys[e.NewEditIndex].Value.ToString(); string strScript; strScript = "<script>window.showModalDialog('./Edit/EditCustomer.aspx?ID=" + strId + "','','dialogWidth=600px;dialogHeight=400px');</script>"; ClientScript.RegisterStartupScript(this.GetType(), "edit", strScript); } #endregion
protected void btnSearch_Click(object sender, EventArgs e)
{
//按ID号查询 CustomerInfo customer = new CustomerInfo(); customer.CustomerId = int.Parse(txtId.Text.ToString()); grvTable.DataSource = bll.dsWhere(customer); grvTable.DataBind();
}
}