Beispiel #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();
        }
Beispiel #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();
        }
Beispiel #3
0
 public abstract void DeleteFamilyRelationship(FamilyRelationshipInfo objFamilyRelationship);
Beispiel #4
0
 public abstract void AddFamilyRelationship(FamilyRelationshipInfo objFamilyRelationship);
 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);
 }