public void Update(SeriesPart entity) { if (entity == null) { throw new ArgumentNullException("entity"); } base.Edit(entity); }
public frmEditSeriesPart(SeriesPart serie, int cateId, string parrentNodeName) { InitializeComponent(); m_Serie = serie; lblNotify1.Text = string.Empty; m_cateId = cateId; txtParrentName.Text = parrentNodeName; }
public void Remove(SeriesPart entity) { if (entity == null) { throw new ArgumentNullException("entity"); } base.Delete(entity); }
public int AddandGetRequestPaymentId(SeriesPart entity) { if (entity == null) { throw new ArgumentNullException("entity"); } string insert = string.Format(@"insert into SeriesPart(SeriesPartCode,SeriesPartName,TypePartId,Note,CreateBy,CreateDate,ModifyBy,ModifyDate) output inserted.SeriesPartId values (@SeriesPartCode,@SeriesPartName,@TypePartId,@Note,@CreateBy,@CreateDate,@ModifyBy,@ModifyDate)"); return(Connection.ExecuteScalar <int>(insert, entity, Transaction)); }
private void btnSave_Click(object sender, EventArgs e) { if (m_Sub == null) { lblNotify1.SetText(UI.hasnoinfomation, ToolBoxCS.LabelNotify.EnumStatus.Failed); return; } SeriesPart serie = new SeriesPart(); serie.TypePartId = m_Sub.TypePartID; serie.SeriesPartCode = txtCode.Text; serie.SeriesPartName = txtName.Text; serie.Note = txtNote.Text; try { int Id = 0; using (IUnitOfWork uow = new UnitOfWork()) { Id = uow.SeriesPartBaseRepository.AddandGetRequestPaymentId(serie); uow.Commit(); } TreeTagPart treeTag = new TreeTagPart(); treeTag.NodeTye = TreeTagPart.Types.SeriesPart; treeTag.TypePartIDTag = m_Sub.TypePartID; treeTag.GroupPartIDTag = m_Sub.GroupPartId.Value; treeTag.SeriesPartIDTag = Id; TreeNode node = new TreeNode(serie.SeriesPartName); node.Tag = treeTag; if (AddNode != null) { AddNode(node); } lblNotify1.SetText(UI.createsuccess, ToolBoxCS.LabelNotify.EnumStatus.Success); Close(); } catch { lblNotify1.SetText(UI.createfailed, ToolBoxCS.LabelNotify.EnumStatus.Failed); } }
public static void BindSeriesParttWidthALl(MetroSearchComboBox cbb, string typePartID) { IList <SeriesPart> lstSupplier; using (IUnitOfWork uow = new UnitOfWork()) { lstSupplier = typePartID == "0" ? uow.SeriesPartBaseRepository.All() : uow.SeriesPartBaseRepository.FindByTypeID(int.Parse(typePartID)); uow.Commit(); } if (lstSupplier == null) { return; } cbb.DataSource = null; SeriesPart objAll = new SeriesPart { SeriesPartName = "Tất cả", SeriesPartId = 0 }; lstSupplier.Add(objAll); cbb.DataSource = lstSupplier; cbb.DisplayMember = "SeriesPartName"; cbb.ValueMember = "SeriesPartId"; }
private void InitializeForm(SeriesPart serie) { txtName.Text = serie.SeriesPartName; txtNote.Text = serie.Note; txtCode.Text = serie.SeriesPartCode; }
public void Add(SeriesPart entry) { throw new NotImplementedException(); }