Exemplo n.º 1
0
        /// <summary>
        /// Fill designation object from datarow
        /// </summary>
        /// <param name="item"></param>
        /// <returns></returns>
        private static Designation Fill(DataRow item)
        {
            if (item == null) return null;

            Designation retObj = new Designation();
            retObj.DesignationID = item.GetIntValue("DesignationID");
            retObj.DesignationName = item.GetValue("DesignationName");

            return retObj;
        }
Exemplo n.º 2
0
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        Designation obj = new Designation();
        obj.DesignationName = txtName.Text;
        if (designationService.Insert(obj))
        {
            lblMessage.Text = "Designation inserted successfully";
        }
        else
        {
            lblMessage.Text = "Error adding Designation";
        }

    }