Exemplo n.º 1
0
        public int Insert(bool isWeb = false)
        {
            if (!JPermission.CheckPermission("BusManagment.Station.JStation.Insert"))
            {
                return(0);
            }
            StationTable AT = new StationTable();

            AT.SetValueProperty(this);
            Code = AT.Insert();
            if (Code > 0 && !isWeb)
            {
                Nodes.DataTable.Merge(JStations.GetDataTable(Code));
            }
            ClassLibrary.JHistory jHistory = new ClassLibrary.JHistory();
            jHistory.Save("BusManagment.JStation", Code, 0, 0, 0, "ثبت ایستگاه", "", 0);
            return(Code);
        }
Exemplo n.º 2
0
        public bool Update(bool isWeb = false)
        {
            if (!JPermission.CheckPermission("BusManagment.Station.JStation.Update"))
            {
                return(false);
            }
            StationTable AT = new StationTable();

            AT.SetValueProperty(this);
            if (AT.Update())
            {
                if (!isWeb)
                {
                    Nodes.Refreshdata(Nodes.CurrentNode, JStations.GetDataTable(Code).Rows[0]);
                }
                ClassLibrary.JHistory jHistory = new ClassLibrary.JHistory();
                jHistory.Save("BusManagment.JStation", AT.Code, 0, 0, 0, "ویرایش ایستگاه", "", 0);
                return(true);
            }
            else
            {
                return(false);
            }
        }
Exemplo n.º 3
0
 private void LoadStations()
 {
     grdStation.DataSource = JStations.GetDataTable();
 }