Exemple #1
0
        public int Insert(bool isWeb = false)
        {
            if (!JPermission.CheckPermission("BusManagment.SellerTicket.JSellerTicket.Insert"))
            {
                return(0);
            }
            JSellerTicketTable AT = new JSellerTicketTable();

            AT.SetValueProperty(this);
            Code = AT.Insert();
            if (Code > 0 && !isWeb)
            {
                Nodes.DataTable.Merge(JSellerTickets.GetDataTable(Code));
            }
            return(Code);
        }
Exemple #2
0
        public bool Delete(bool isWeb = false)
        {
            if (!JPermission.CheckPermission("BusManagment.SellerTicket.JSellerTicket.Delete"))
            {
                return(false);
            }
            JSellerTicketTable AT = new JSellerTicketTable();

            AT.SetValueProperty(this);
            if (AT.Delete())
            {
                if (!isWeb)
                {
                    Nodes.Delete(Nodes.CurrentNode);
                }
                return(true);
            }
            else
            {
                return(false);
            }
        }
Exemple #3
0
        public bool Update(bool isWeb = false)
        {
            if (!JPermission.CheckPermission("BusManagment.SellerTicket.JSellerTicket.Update"))
            {
                return(false);
            }
            JSellerTicketTable AT = new JSellerTicketTable();

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