本文整理汇总了C#中Manufacturer.Save方法的典型用法代码示例。如果您正苦于以下问题:C# Manufacturer.Save方法的具体用法?C# Manufacturer.Save怎么用?C# Manufacturer.Save使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Manufacturer
的用法示例。
在下文中一共展示了Manufacturer.Save方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: btnSave_Click
/// <summary>
/// Handles the Click event of the btnSave control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param>
protected void btnSave_Click(object sender, EventArgs e)
{
try {
Manufacturer manufacturer = new Manufacturer();
manufacturer.Name = txtName.Text;
manufacturer.Save(WebUtility.GetUserName());
Reset();
LoadManufacturers();
Master.MessageCenter.DisplaySuccessMessage(LocalizationUtility.GetText("lblManufacturerSaved"));
}
catch (Exception ex) {
Logger.Error(typeof(manufacturers).Name + ".btnSave_Click", ex);
Master.MessageCenter.DisplayCriticalMessage(ex.Message);
}
}
示例2: Update
public void Update(int ManufacturerId,string Name,string CreatedBy,DateTime CreatedOn,string ModifiedBy,DateTime ModifiedOn)
{
Manufacturer item = new Manufacturer();
item.ManufacturerId = ManufacturerId;
item.Name = Name;
item.CreatedBy = CreatedBy;
item.CreatedOn = CreatedOn;
item.ModifiedBy = ModifiedBy;
item.ModifiedOn = ModifiedOn;
item.MarkOld();
item.Save(UserName);
}
示例3: Insert
public void Insert(string Name,string CreatedBy,DateTime CreatedOn,string ModifiedBy,DateTime ModifiedOn)
{
Manufacturer item = new Manufacturer();
item.Name = Name;
item.CreatedBy = CreatedBy;
item.CreatedOn = CreatedOn;
item.ModifiedBy = ModifiedBy;
item.ModifiedOn = ModifiedOn;
item.Save(UserName);
}
示例4: btnManufacturerAdd_Click
/// <summary>
/// Handles the Click event of the btnManufacturerAdd control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param>
protected void btnManufacturerAdd_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(txtManufacturerAdd.Text)) {
Manufacturer manufacturer = new Manufacturer();
manufacturer.Name = txtManufacturerAdd.Text.Trim();
manufacturer.Save(WebUtility.GetUserName());
txtManufacturerAdd.Text = string.Empty;
LoadManufacturer();
ddlManufacturer.SelectedIndex = ddlManufacturer.Items.Count - 1;
}
}