Ejemplo n.º 1
0
        public int Insert(bool isWebProject)
        {
            if (!JPermission.CheckPermission("BusManagment.WorkOrder.JAUTVacation.Insert"))
            {
                return(0);
            }
            JAUTVacationTable AT = new JAUTVacationTable();

            AT.SetValueProperty(this);
            Code = AT.Insert();
            if (Code > 0)
            {
                if (!isWebProject)
                {
                    Nodes.DataTable.Merge(JAUTVacations.GetDataTable(Code));
                }
            }
            return(Code);
        }
Ejemplo n.º 2
0
        public bool Update()
        {
            if (!JPermission.CheckPermission("BusManagment.WorkOrder.JAUTVacation.Update"))
            {
                return(false);
            }
            JAUTVacationTable AT = new JAUTVacationTable();

            AT.SetValueProperty(this);
            if (AT.Update())
            {
                Nodes.Refreshdata(Nodes.CurrentNode, JAUTVacations.GetDataTable(Code).Rows[0]);
                return(true);
            }
            else
            {
                return(false);
            }
        }