本文整理汇总了C#中System.Web.UI.WebControls.FormViewInsertEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# FormViewInsertEventArgs类的具体用法?C# FormViewInsertEventArgs怎么用?C# FormViewInsertEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FormViewInsertEventArgs类属于System.Web.UI.WebControls命名空间,在下文中一共展示了FormViewInsertEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: fvProject_ItemInserting
protected void fvProject_ItemInserting(object sender, FormViewInsertEventArgs e)
{
//TODO: Set value of Project Account and CreateBy field
e.Values["Account"] = SEOMembershipManager.GetUser(User.Identity.Name).Account;
e.Values["CreateBy"] = User.Identity.Name;
}
示例2: FormView1_ItemInserting
protected void FormView1_ItemInserting(object sender, FormViewInsertEventArgs e)
{
e.Values["Incidente"] = getNewIncidente().ToString();
e.Values["Usuario"] = BitOP.Global.Usuario;
e.Values["Planta"] = SelPlanta.Text;
e.Values["Area"] = SelArea.Text;
e.Values["Proceso"] = SelProceso.Text;
}
示例3: FormView1_ItemInserting
protected void FormView1_ItemInserting(object sender, FormViewInsertEventArgs e)
{
BillingEntities db=new BillingEntities();
User user = db.Users.FirstOrDefault(s => s.Login == User.Identity.Name);
e.Values.Add("UserFromId", user.Id);
e.Values.Add("UserToId", int.Parse(Request.Params["Id"]));
e.Values.Add("IsReaded", false);
}
示例4: FormView1_ItemInserting
protected void FormView1_ItemInserting(object sender, FormViewInsertEventArgs e)
{
int tariffId = int.Parse(((DropDownList)FormView1.FindControl("TariffIdDropDownList")).SelectedValue);
e.Values.Add("TariffId", tariffId);
TextBox balanceTextBox = ((TextBox)FormView1.FindControl("BalanceTextBox"));
if (balanceTextBox.Text == "")
e.Values["Balance"] = (decimal?)0;
}
示例5: frmCampoPlantilla_ItemInserting
protected void frmCampoPlantilla_ItemInserting(object sender, FormViewInsertEventArgs e)
{
if (e.Values["CMP_LONGITUD_CABECERA"].ToString() == string.Empty)
{
e.Values["CMP_LONGITUD_CABECERA"] = null;
}
if (e.Values["CMP_POSICION_RELATIVA"].ToString() == string.Empty)
{
e.Values["CMP_POSICION_RELATIVA"] = null;
}
}
示例6: FormView1_ItemInserting
protected void FormView1_ItemInserting(object sender, FormViewInsertEventArgs e)
{
FileUpload fileUpload = FormView1.FindControl("fileUpload") as FileUpload;
e.Values.Add("FileVersion", Path.GetFileNameWithoutExtension(fileUpload.FileName));
e.Values.Add("FileName", Path.GetFileName(fileUpload.FileName));
e.Values.Add("FileBytes", fileUpload.FileBytes);
e.Values.Add("PostTime", DateTime.Now);
string savingType = drpSavingType2.SelectedValue;
e.Values.Add("SavingType", savingType);
}
示例7: PGFV_ItemInserting
/**
* We are in "insert" mode, and the "insert" button was pressed
* */
protected void PGFV_ItemInserting(Object sender, FormViewInsertEventArgs e)
{
String albumName = ((TextBox)this.PGFV.FindControl("albumNameTextBox")).Text;
String albumDescription = ((TextBox)this.PGFV.FindControl("albumDescTextBox")).Text;
//Create new entry
controller.createNewAlbum(albumName, albumDescription);
rebind(); //rebind the grid
//now, find the id to select it on the Grid
this.PGFV.ChangeMode(FormViewMode.ReadOnly);
rebindForm(-1);
}
示例8: InsertOneRecord
//******添加数据使用的函数和方法******
/// <summary>
/// 添加一条生产记录或者报废记录数据到数据库
/// </summary>
/// <param name="cmd">查询对象</param>
/// <param name="lotId">lot卡号</param>
/// <param name="e">包含有数据列表值的事件参数</param>
/// <param name="isToNextDept">是否转入下部门结存</param>
/// <returns></returns>
internal static bool InsertOneRecord(
SqlCommand cmd,
string lotId,
FormViewInsertEventArgs e,
bool isToNextDept = true
)
{
//当前部门
string deptName = HttpContext.Current.Session["dept_name"].ToString();
//调用另一重载函数
return InsertOneRecord(cmd, lotId, e, string.Empty, deptName, isToNextDept);
}
示例9: InsertOneRecord
//******添加数据使用的函数和方法******
/// <summary>
/// 添加一条生产记录或者报废记录数据到数据库
/// </summary>
/// <param name="cmd">查询对象</param>
/// <param name="lotId">批量卡序号</param>
/// <param name="e">包含有数据列表值的事件参数</param>
/// <param name="isToNextProc">是否转入下部门结存</param>
/// <param name="isAccept">是否已经确认过该卡数量</param>
/// <returns></returns>
internal static bool InsertOneRecord(
SqlCommand cmd,
string lotId,
FormViewInsertEventArgs e,
bool isToNextProc = true,
bool? isAccept = true
)
{
//当前部门
string procName = HttpContext.Current.Session["proc_name"].ToString();
//调用另一重载函数
return InsertOneRecord(cmd, lotId, e, procName, isToNextProc, isAccept);
}
示例10: PrideRunOrdersEditorFormView_ItemInserting
/**
* Currently NOT used
* We are in "insert" mode, and the "insert" button was pressed
* */
protected void PrideRunOrdersEditorFormView_ItemInserting(Object sender, FormViewInsertEventArgs e)
{
String firstName = ((TextBox)PrideRunOrdersEditorFormView.FindControl("firstNameTextBox")).Text;
String lastName = ((TextBox)PrideRunOrdersEditorFormView.FindControl("lastNameTextBox")).Text;
String email = ((TextBox)PrideRunOrdersEditorFormView.FindControl("emailTextBox")).Text;
//Response.Write("Inserting...<br>");
//Response.Write(eventName + "," + distance + "," + city + "," + state + "," + website + "," + cal.ToShortDateString());
controller.insertAMember(firstName, lastName, email);
rebind(); //rebind the grid
PrideRunOrdersEditorFormView.ChangeMode(FormViewMode.ReadOnly);
rebindForm(-1);
}
示例11: FormView1_ItemInserting
protected void FormView1_ItemInserting(object sender, FormViewInsertEventArgs e)
{
DropDownList UsuarioSel = (DropDownList)FormView1.FindControl("DropDownListUsuario");
DropDownList AreaSel = (DropDownList)FormView1.FindControl("DropDownListArea");
DropDownList ProcesoSel = (DropDownList)FormView1.FindControl("DropDownListProceso");
DropDownList EquipoSel = (DropDownList)FormView1.FindControl("DropDownListEquipo");
DropDownList TurnoSel = (DropDownList)FormView1.FindControl("DropDownListTurno");
DropDownList DiasPermSel = (DropDownList)FormView1.FindControl("DropDownListDiasPerm");
e.Values["Usuario"] = UsuarioSel.SelectedValue.ToString();
e.Values["Area"] = AreaSel.SelectedValue.ToString();
e.Values["Proceso"] = ProcesoSel.SelectedValue.ToString();
e.Values["Equipo"] = EquipoSel.SelectedValue.ToString();
e.Values["Turno"] = TurnoSel.SelectedValue.ToString();
e.Values["DiasAtrasoReg"] = Convert.ToInt16(DiasPermSel.SelectedValue.ToString());
}
示例12: frmProtocolo_ItemInserting
protected void frmProtocolo_ItemInserting(object sender, FormViewInsertEventArgs e)
{
if (e.Values["PTR_PUERTO"].ToString() == string.Empty)
{
e.Values["PTR_PUERTO"] = null;
}
if (e.Values["PTR_TIMEOUT_REQUEST"].ToString() == string.Empty)
{
e.Values["PTR_TIMEOUT_REQUEST"] = null;
}
if (e.Values["PTR_TIMEOUT_RESPONSE"].ToString() == string.Empty)
{
e.Values["PTR_TIMEOUT_RESPONSE"] = null;
}
if (e.Values["PTR_FRAME"].ToString() == string.Empty)
{
e.Values["PTR_FRAME"] = null;
}
}
示例13: EventEditorFormView_ItemInserting
/**
* We are in "insert" mode, and the "insert" button was pressed
* */
protected void EventEditorFormView_ItemInserting(Object sender, FormViewInsertEventArgs e)
{
String eventName = ((TextBox)EventEditorFormView.FindControl("eventNameTextBox")).Text;
eventName = eventName.Replace("'", "''");
String distance = ((TextBox)EventEditorFormView.FindControl("distanceTextBox")).Text;
String city = ((TextBox)EventEditorFormView.FindControl("cityTextBox")).Text;
String state = ((TextBox)EventEditorFormView.FindControl("stateTextBox")).Text;
String website = ((TextBox)EventEditorFormView.FindControl("websiteTextBox")).Text;
//DateTime cal = (DateTime)((CalendarExtender)EventEditorFormView.FindControl("calendartest")).SelectedDate;
String date = ((TextBox)EventEditorFormView.FindControl("eventDateTextBox")).Text;
String[] splitDate = date.Split('/');
DateTime cal = new DateTime(Int32.Parse(splitDate[2]), Int32.Parse(splitDate[0]), Int32.Parse(splitDate[1]));
//Response.Write("Inserting...<br>");
//Response.Write(eventName + "," + distance + "," + city + "," + state + "," + website + "," + cal.ToShortDateString());
controller.createNewEvent(cal, eventName, distance, city, state, website);
rebind(); //rebind the grid
//now, find the id to select it on the Grid
EventEditorFormView.ChangeMode(FormViewMode.ReadOnly);
rebindForm(-1);
//Response.Write("Inserting");
}
示例14: formFeeds_ItemInserting
protected void formFeeds_ItemInserting(object sender, FormViewInsertEventArgs e)
{
XmlDocument xdoc = XmlDataSource_feed.GetXmlDocument();
XmlElement feeds = xdoc.SelectSingleNode("feeds") as XmlElement;
XmlElement feed = xdoc.CreateElement("feed");
XmlAttribute name = xdoc.CreateAttribute("name");
XmlAttribute url = xdoc.CreateAttribute("url");
name.InnerText = ((TextBox)formFeeds.Row.Cells[0].FindControl("nameInsert")).Text;
url.InnerText = ((TextBox)formFeeds.Row.Cells[0].FindControl("urlInsert")).Text;
feeds.AppendChild(feed);
feed.Attributes.Append(name);
feed.Attributes.Append(url);
XmlDataSource_feed.Save();
XmlDataSource_feed.DataBind();
formFeeds.DataBind();
formFeeds.ChangeMode(FormViewMode.ReadOnly);
e.Cancel = true;
}
示例15: d_ItemInserting
static void d_ItemInserting (object sender, FormViewInsertEventArgs e)
{
if (WebTest.CurrentTest.UserData == null) {
ArrayList list = new ArrayList ();
list.Add ("ItemInserting");
WebTest.CurrentTest.UserData = list;
}
else {
ArrayList list = WebTest.CurrentTest.UserData as ArrayList;
if (list == null)
throw new NullReferenceException ();
list.Add ("ItemInserting");
WebTest.CurrentTest.UserData = list;
}
}