本文整理汇总了C#中BAL.ClsBAL.UpdateSourceStatus方法的典型用法代码示例。如果您正苦于以下问题:C# ClsBAL.UpdateSourceStatus方法的具体用法?C# ClsBAL.UpdateSourceStatus怎么用?C# ClsBAL.UpdateSourceStatus使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BAL.ClsBAL
的用法示例。
在下文中一共展示了ClsBAL.UpdateSourceStatus方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: gvCities_RowCommand
protected void gvCities_RowCommand(object sender, System.Web.UI.WebControls.GridViewCommandEventArgs e)
{
try
{
if (e.CommandName == "TRUEorFALSE")
{
LinkButton lbtn = (LinkButton)e.CommandSource;
string status = "";
if (lbtn.ToolTip == "TRUE") { status = "FALSE"; } else { status = "TRUE"; }
objBal = new ClsBAL();
objBal.UpdateSourceStatus(status, e.CommandArgument.ToString());
DataSet ds = GetCitiesByLetter(ddlLetter.SelectedItem.Text.ToString());
gvCities.DataSource = ds;
gvCities.DataBind();
}
else if (e.CommandName == "OriginalIDtoID")
{
LinkButton lbtn = (LinkButton)e.CommandSource;
//string status = "";
//if (lbtn.ToolTip == "TRUE") { status = "FALSE"; } else { status = "TRUE"; }
objBal = new ClsBAL();
objBal.UpdateSource(lbtn.ToolTip.ToString(), e.CommandArgument.ToString(), e.CommandArgument.ToString());
DataSet ds = GetCitiesByLetter(ddlLetter.SelectedItem.Text.ToString());
gvCities.DataSource = ds;
gvCities.DataBind();
}
else if (e.CommandName == "SELECT")
{
LinkButton lbtn = (LinkButton)e.CommandSource;
GridViewRow row = (GridViewRow)lbtn.NamingContainer;
Label lblID = (Label)row.FindControl("lblID");
Label lblOriginalID = (Label)row.FindControl("lblOriginalID");
Label lblSourceName = (Label)row.FindControl("lblSourceName");
Label lblStatus = (Label)row.FindControl("lblStatus");
LinkButton lbtnMakeIt = (LinkButton)row.FindControl("lbtnMakeIt");
DataTable dtSources = null;
if (HttpContext.Current.Session["Cities"] == null)
{
dtSources = new DataTable();
dtSources.Columns.Add("ID");
dtSources.Columns.Add("OriginalID");
dtSources.Columns.Add("SourceName");
dtSources.Columns.Add("Status");
DataRow dr = dtSources.NewRow();
dr["ID"] = lblID.Text.ToString();
dr["OriginalID"] = lblOriginalID.Text.ToString();
dr["SourceName"] = lblSourceName.Text.ToString();
dr["Status"] = lblStatus.Text.ToString();
dtSources.Rows.Add(dr);
HttpContext.Current.Session["Cities"] = dtSources;
}
else
{
dtSources = (DataTable)HttpContext.Current.Session["Cities"];
DataRow dr = dtSources.NewRow();
dr["ID"] = lblID.Text.ToString();
dr["OriginalID"] = lblOriginalID.Text.ToString();
dr["SourceName"] = lblSourceName.Text.ToString();
dr["Status"] = lblStatus.Text.ToString();
dtSources.Rows.Add(dr);
HttpContext.Current.Session["Cities"] = dtSources;
}
gv.Visible = true;
gv.DataSource = dtSources;
gv.DataBind();
if (gv.Rows.Count > 1) { btnSubmit.Visible = true; } else { btnSubmit.Visible = false; }
}
}
catch (Exception)
{
throw;
}
}