public frmcreateTypePart(int cateId, string strTextTag) { InitializeComponent(); m_Category = new GroupPart(); m_Category.GroupPartId = cateId; _currentTextNode = strTextTag; }
public void Update(GroupPart entity) { if (entity == null) { throw new ArgumentNullException("entity"); } base.Edit(entity); }
public frmEditGroupPart(GroupPart groupPart) { InitializeComponent(); lblNotify1.Text = ""; Select(); m_GroupPart = groupPart; txtCode.Select(); txtCode.Focus(); }
public void Remove(GroupPart entity) { if (entity == null) { throw new ArgumentNullException("entity"); } base.Delete(entity); }
public int AddandGetRequestPaymentId(GroupPart entity) { if (entity == null) { throw new ArgumentNullException("entity"); } string insert = string.Format(@"insert into GroupPart(GroupPartCode,GroupPartName,Note,CreateDate,CreateBy,ModifyDate,ModifyBy) output inserted.GroupPartId values (@GroupPartCode,@GroupPartName,@Note,@CreateDate,@CreateBy,@ModifyDate,@ModifyBy)"); return(Connection.ExecuteScalar <int>(insert, entity, Transaction)); }
public bool FindExist(GroupPart entity) { List <GroupPart> lstCategory; lstCategory = Connection.Query <Model.GroupPart>("select * from GroupPart where GroupPartCode = @GroupPartCode and GroupPartId <>@Id", new { GroupPartCode = entity.GroupPartCode, Id = entity.GroupPartId }, transaction: Transaction).ToList(); if (lstCategory == null || lstCategory.Count > 0) { return(true); } return(false); }
public string ToSql(SqlGenerator generator) { var sb = new StringBuilder(); sb.Append("Select "); if (SelectPart.Any()) { sb = SelectPart.Aggregate(sb, (s, i) => s.AppendFormat("{0},", i.ToSql(generator))); sb.Remove(sb.Length - 1, 1); } else { sb.Append("*"); } sb.Append(" From "); sb = FromPart.Aggregate(sb, (s, i) => s.AppendFormat("{0} ", i.ToSql(generator))); if (WherePart != null) { sb.AppendFormat("Where {0}", WherePart.ToSql(generator)); } if (GroupPart.Any()) { sb.Append(" Group By "); sb = GroupPart.Aggregate(sb, (s, o) => s.AppendFormat("{0},", o.ToSql(generator, false))); sb.Remove(sb.Length - 1, 1); } if (OrderPart.Any()) { sb.Append(" Order By "); sb = OrderPart.Aggregate(sb, (s, o) => s.AppendFormat("{0},", o.ToSql(generator))); sb.Remove(sb.Length - 1, 1); } if (Take.HasValue) { sb.Append(" limit "); if (Skip.HasValue) { sb.AppendFormat("{0},", Skip.Value); } sb.Append(Take.Value); } return(sb.ToString()); }
private void cbbGroupPart_SelectedValueChanged(object sender, EventArgs e) { if (isLoad) { return; } GroupPart group = cbbGroupPart.SelectedItem as GroupPart; if (group == null) { return; } int grouppartId = group.GroupPartId; ComboboxUtility.BindTypePartWidthALl(cbbTypePart, grouppartId.ToString()); }
public static void BindGroupPartWidthALl(MetroSearchComboBox cbb) { IList <GroupPart> lstSupplier; using (IUnitOfWork uow = new UnitOfWork()) { lstSupplier = uow.GroupPartBaseRepository.All(); uow.Commit(); } if (lstSupplier != null) { cbb.DataSource = null; GroupPart objAll = new GroupPart { GroupPartName = "Tất cả", GroupPartId = 0 }; lstSupplier.Add(objAll); cbb.DataSource = lstSupplier; cbb.DisplayMember = "GroupPartName"; cbb.ValueMember = "GroupPartId"; } }
public MeetingGroup(string groupName, GroupPart groupPart) { GroupName = groupName; GroupPart = groupPart; }
public void Add(GroupPart entry) { throw new NotImplementedException(); }
private void InitializeForm(GroupPart groupPart) { txtCode.Text = groupPart.GroupPartCode; txtName.Text = groupPart.GroupPartName; txtNote.Text = groupPart.Note; }