Ejemplo n.º 1
0
        protected void grdFamily_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e)
        {
            ASPxTextBox text = grdFamily.FindEditFormTemplateControl("txtName") as ASPxTextBox;

            ASPxTextBox  textId        = grdFamily.FindEditFormTemplateControl("txtId") as ASPxTextBox;
            ASPxComboBox cboRelate     = grdFamily.FindEditFormTemplateControl("cboRelate") as ASPxComboBox;
            ASPxTextBox  txtBirdthday  = grdFamily.FindEditFormTemplateControl("txtBirdthday") as ASPxTextBox;
            ASPxTextBox  txtAdress     = grdFamily.FindEditFormTemplateControl("txtAdress") as ASPxTextBox;
            ASPxTextBox  txtOccupation = grdFamily.FindEditFormTemplateControl("txtOccupation") as ASPxTextBox;
            ASPxTextBox  txtHistory    = grdFamily.FindEditFormTemplateControl("txtHistory") as ASPxTextBox;
            ASPxTextBox  txtEmpId      = grdFamily.FindEditFormTemplateControl("txtEmpId") as ASPxTextBox;

            this.family = obiFamily.GetFamilyRelationship(Int32.Parse(textId.Text));

            if (this.family != null)
            {
                this.family.birthday       = txtBirdthday.Text;
                this.family.fullname       = text.Text;
                this.family.occupation     = txtOccupation.Text;
                this.family.description    = txtHistory.Text;
                this.family.placeofbirth   = txtAdress.Text;
                this.family.editor         = this.UserId;
                this.family.modifieddate   = DateTime.Now;
                this.family.ip             = HttpContext.Current.Request.UserHostAddress;
                this.family.employeeid     = Int32.Parse(txtEmpId.Text.Trim());
                this.family.relationshipid = Int32.Parse(cboRelate.SelectedItem.Value.ToString());
                this.obiFamily.UpdateFamilyRelationship(family);
            }

            grdFamily.CancelEdit();
            e.Cancel = true;
            BindGrid();
        }
Ejemplo n.º 2
0
        protected void grdFamily_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e)
        {
            this.family = obiFamily.GetFamilyRelationship(Int32.Parse(e.Keys[grdFamily.KeyFieldName].ToString()));
            if (this.family != null)
            {
                this.obiFamily.DeleteFamilyRelationship(family);
            }

            grdFamily.CancelEdit();
            e.Cancel = true;
            BindGrid();
        }
Ejemplo n.º 3
0
 public abstract void DeleteFamilyRelationship(FamilyRelationshipInfo objFamilyRelationship);
Ejemplo n.º 4
0
 public abstract void AddFamilyRelationship(FamilyRelationshipInfo objFamilyRelationship);
Ejemplo n.º 5
0
 public override void DeleteFamilyRelationship(FamilyRelationshipInfo objFamilyRelationship)
 {
     SqlHelper.ExecuteNonQuery(ConnectionString, GetFullyQualifiedName("HRM_FamilyRelationship"), objFamilyRelationship.id, objFamilyRelationship.fullname, objFamilyRelationship.birthday, objFamilyRelationship.placeofbirth, objFamilyRelationship.address, objFamilyRelationship.occupation, objFamilyRelationship.description, objFamilyRelationship.relationshipid, objFamilyRelationship.employeeid, objFamilyRelationship.reason, objFamilyRelationship.editor, objFamilyRelationship.modifieddate, objFamilyRelationship.ip, 2);
 }
 public void UpdateFamilyRelationship(FamilyRelationshipInfo objFamilyRelationship)
 {
     DataProvider.Instance().UpdateFamilyRelationship(objFamilyRelationship);
 }
 public void AddFamilyRelationship(FamilyRelationshipInfo objFamilyRelationship)
 {
     DataProvider.Instance().AddFamilyRelationship(objFamilyRelationship);
 }