20210520
This commit is contained in:
@@ -18,7 +18,6 @@ namespace FineUIPro.Web.JDGL.Check
|
||||
if (!IsPostBack)
|
||||
{
|
||||
//GetButtonPower();
|
||||
this.txtMonths.Text = string.Format("{0:yyyy-MM}", DateTime.Now);
|
||||
BindGrid();
|
||||
}
|
||||
}
|
||||
@@ -79,28 +78,19 @@ namespace FineUIPro.Web.JDGL.Check
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
GetQuantityCompletion();
|
||||
if (!string.IsNullOrEmpty(this.txtMonths.Text.Trim()))
|
||||
{
|
||||
string strSql = @"select *
|
||||
//GetQuantityCompletion();
|
||||
string strSql = @"select *
|
||||
from dbo.View_JDGL_QuantityCompletion qc
|
||||
where qc.ProjectId=@ProjectId and qc.Months=@Months order by qc.SortIndex,qc.Name";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||
listStr.Add(new SqlParameter("@Months", this.txtMonths.Text.Trim() + "-01"));
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
//tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("请选择月份!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
where qc.ProjectId=@ProjectId order by qc.Name";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
//tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
|
||||
#region 月份选择事件
|
||||
|
||||
Reference in New Issue
Block a user