本文整理汇总了C#中GridViewRow.FindControl方法的典型用法代码示例。如果您正苦于以下问题:C# GridViewRow.FindControl方法的具体用法?C# GridViewRow.FindControl怎么用?C# GridViewRow.FindControl使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GridViewRow
的用法示例。
在下文中一共展示了GridViewRow.FindControl方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetOrderItem
private OrderItem GetOrderItem(GridViewRow row)
{
var qtyLabel = row.FindControl("Quantity") as Label;
var nameLabel = row.FindControl("ItemName") as Label;
var priceLabel = row.FindControl("Price") as Label;
var result = new OrderItem()
{
Quantity = int.Parse(qtyLabel.Text),
ItemName = nameLabel.Text,
Price = decimal.Parse(priceLabel.Text)
};
return result;
}
示例2: GetProductByCategory
private CategoryProduct GetProductByCategory(GridViewRow row)
{
var cateDesLabel = row.FindControl("ProductCategoryDes_LB") as Label;
var productDesLabel = row.FindControl("ProductDes_LB") as Label;
var priceLabel = row.FindControl("SellingPrice_LB") as Label;
var qohLabel = row.FindControl("QOH_LB") as Label;
var result = new CategoryProduct()
{
ProdcutCategoryDes = cateDesLabel.Text,
ProductDes = productDesLabel.Text,
SellingPrice = Decimal.Parse(priceLabel.Text.ToString()),
QOH = int.Parse(qohLabel.Text.ToString())
};
return result;
}
示例3: IsRowModified
protected bool IsRowModified(GridViewRow r)
{
int currentID;
Boolean cbVerificado;
currentID = Convert.ToInt32(GridView1.DataKeys[0].Value);
cbVerificado = ((CheckBox)r.FindControl("CheckBox1")).Checked;
DataRow row =
originalDataTable.Select(String.Format("id = {0}", currentID))[0];
if (!cbVerificado.Equals(row["Estado"].ToString()))
{
return true;
}
return false;
}
示例4: SetVisibilityForCancelButton
private void SetVisibilityForCancelButton(GridViewRow currentRow, bool visibility)
{
if (currentRow.FindControl("lnkEdit") != null)
{
currentRow.FindControl("lnkEdit").Visible = visibility;
}
}
示例5: SetInputControls
//Assigns the right controls to global controls variables
public void SetInputControls(GridViewRow gridViewRowData)
{
DropDownListClient = (PolytexControls.DropDownList)(gridViewRowData.FindControl("DropDownListClient"));
DropDownListModel = (PolytexControls.DropDownList)(gridViewRowData.FindControl("DropDownListModel"));
TextBoxSerial = (PolytexControls.TextBox)(gridViewRowData.FindControl("TextBoxSerial"));
TextBoxDescription = (PolytexControls.TextBox)(gridViewRowData.FindControl("TextBoxDescription"));
territoryId = getTerritoryIdByClient(Util.ValidateInt(DropDownListClient.AspDropDownList.SelectedValue.ToString(), 0));
TextBoxUnitIp = (PolytexControls.TextBox)(gridViewRowData.FindControl("TextBoxUnitIP"));
TextBoxCameraIp = (PolytexControls.TextBox)(gridViewRowData.FindControl("TextBoxCameraIP"));
TextBoxSWVersion = (PolytexControls.TextBox)(gridViewRowData.FindControl("TextBoxSWVersion"));
}
示例6: SetVisibilityForReIssueButton
private void SetVisibilityForReIssueButton(GridViewRow currentRow, bool visibility)
{
if (currentRow.FindControl("lnkReIssue") != null)
{
currentRow.FindControl("lnkReIssue").Visible = visibility;
}
}
示例7: CancelInvByChange
private int CancelInvByChange(GridViewRow grdRow)
{
HiddenField hdfINV_NO = (HiddenField)grdRow.FindControl("hdfINV_NO");
HiddenField hdfUPDATEDATE = (HiddenField)grdRow.FindControl("hdfUPDATEDATE");
HiddenField hdfUPDATEUID = (HiddenField)grdRow.FindControl("hdfUPDATEUID");
ASP.wui_slp_slp_slpdate_ascx slp_CANCEL_DATE = (ASP.wui_slp_slp_slpdate_ascx)grdRow.FindControl("slp_CANCEL_DATE");
CAAModel.ProcessInvoiceChange BCO = new CAAModel.ProcessInvoiceChange(ConntionDB);
ParameterList.Clear();
ParameterList.Add(hdfINV_NO.Value);
ParameterList.Add(slp_CANCEL_DATE.Text);
ParameterList.Add(DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss"));
ParameterList.Add(Session["UID"].ToString());
ParameterList.Add(hdfUPDATEDATE.Value);
ParameterList.Add(hdfUPDATEUID.Value);
return BCO.CancelInvByChange(ParameterList, null);
}
示例8: GetOrderViewControl
private Visualization_GoodsTraceability_Traceability_View GetOrderViewControl(GridViewRow gvr)
{
return (Visualization_GoodsTraceability_Traceability_View)gvr.FindControl("ucView");
}
示例9: GetKanbanControl
private Visualization_InvVisualBoard_Kanban GetKanbanControl(GridViewRow gvr)
{
return (Visualization_InvVisualBoard_Kanban)gvr.FindControl("ucKanban");
}
示例10: GetTextBoxValue
private string GetTextBoxValue(GridViewRow currentRow, string controlName)
{
string textBoxValue = string.Empty;
if (currentRow.FindControl(controlName).Visible == true)
{
textBoxValue = ((TextBox)currentRow.FindControl(controlName)).Text;
}
return textBoxValue;
}
示例11: GetItemCodeTextBox
private TextBox GetItemCodeTextBox(GridViewRow gvr)
{
return (TextBox)gvr.FindControl("tbItemCode");
}
示例12: UpdateItem
private void UpdateItem(GridViewRow gvr)
{
if (gvr != null)
{
string model = string.Empty;
TextBox txtOrderQty = gvr.Cells[3].FindControl("txtOrderQty") as TextBox;
DropDownList dropPriority = gvr.Cells[3].FindControl("ddlOrderPriority") as DropDownList;
Label lbModel = gvr.Cells[1].FindControl("lbModel") as Label;
if (lbModel.Visible) // not on sale model
model = lbModel.ToolTip;
else //if (string.IsNullOrEmpty(model))
{
DropDownList ddlItem = gvr.Cells[3].FindControl("ddlItem") as DropDownList;
model = ddlItem.SelectedValue;
}
int index = int.Parse(gvr.Cells[0].Text) - 1;
VDMS.Core.Domain.Item it = Order.GetItemById(model);
if (it == null)
{
_items[index].Item = new Item() { Id = string.Empty };
gvr.Cells[2].Text = string.Empty;
gvr.Cells[4].Text = "0";
_items[index].Orderqty = 0;
_items[index].Orderpriority = 2;
_items[index].Unitprice = 0;
}
else
{
Literal litPrice = (Literal)gvr.FindControl("litPrice");
_items[index].Item = it;
gvr.Cells[2].Text = it.Colorname;
gvr.Cells[4].Text = it.GetUnitPrice(UserHelper.DatabaseCode).ToString("N0");
_items[index].Orderqty = int.Parse(txtOrderQty.Text);
_items[index].Orderpriority = int.Parse(dropPriority.SelectedValue);
_items[index].Unitprice = it.GetUnitPrice(UserHelper.DatabaseCode);
litPrice.Text = _items[index].Price.ToString("N0");
}
CalculateTotal(gvMain);
//BindData();
}
}
示例13: GetDetailControl
private MRP_ShiftPlan_Import_PreviewDetail GetDetailControl(GridViewRow gvr)
{
return (MRP_ShiftPlan_Import_PreviewDetail)gvr.FindControl("ucDetail");
}
示例14: GetItemCodeLabel
private Label GetItemCodeLabel(GridViewRow gvr)
{
return (Label)gvr.FindControl("lblItemCode");
}
示例15: GetTransformerDetailControl
private Hu_TransformerDetail GetTransformerDetailControl(GridViewRow gvr)
{
return (Hu_TransformerDetail)gvr.FindControl("ucTransformerDetail");
}