Exemple #1
0
        public bool Insert(bool isWeb = false)
        {
            if (!JPermission.CheckPermission("BusManagment.Dictionary.JDictionary.Insert"))
            {
                return(false);
            }

            JDataBase DB = new JDataBase();

            try
            {
                DB.setQuery("insert into dic (name, text, lang) output inserted.* values(N'" + Name + "', N'" + Text + "', N'" + Lang + "')");
                DataTable dt = DB.Query_DataTable();
                if (dt == null || dt.Rows.Count == 0)
                {
                    return(false);
                }
                ClassLibrary.JHistory jHistory = new ClassLibrary.JHistory();
                jHistory.Save("BusManagment.JDictionary", 0, 0, 0, 0, "ثبت در لغت نامه ", "", 0);
                return(true);
            }
            catch
            {
                return(false);
            }
            finally
            {
                DB.Dispose();
            }
        }
Exemple #2
0
        public int Insert(JDataBase db = null)
        {
            if (GetDailyData(BusNumber, StartDate, EndDate))
            {
                State = 0;
                Update();
                return(Code);
            }
            else
            {
                JBusPrintReportTable AT = new JBusPrintReportTable();
                AT.SetValueProperty(this);
                if (db == null)
                {
                    Code = AT.Insert();
                }
                else
                {
                    Code = AT.Insert(db);
                }
                ClassLibrary.JHistory jHistory = new ClassLibrary.JHistory();
                // jHistory.Save("BusManagment.JBusPrintReport", Code, 0, 0, 0, "ثبت پرینت اتوبوس", "", 0);

                return(Code);
            }
        }
Exemple #3
0
        public bool Update(bool isWeb = false)
        {
            if (!JPermission.CheckPermission("BusManagment.Dictionary.JDictionary.Update"))
            {
                return(false);
            }

            JDataBase DB = new JDataBase();

            try
            {
                DB.setQuery("update dic set text = N'" + Text + "' output inserted.text where name = N'" + Name + "' and lang = N'" + Lang + "'");
                DataTable dt = DB.Query_DataTable();
                if (dt == null || dt.Rows.Count == 0)
                {
                    return(false);
                }
                ClassLibrary.JHistory jHistory = new ClassLibrary.JHistory();
                jHistory.Save("BusManagment.JDictionary", 0, 0, 0, 0, "ویرایش در لغت نامه ", "", 0);
                return(true);
            }
            catch
            {
                return(false);
            }
            finally
            {
                DB.Dispose();
            }
        }
Exemple #4
0
        public bool Delete(bool isWeb = false)
        {
            if (!JPermission.CheckPermission("BusManagment.Dictionary.JDictionary.Delete"))
            {
                return(false);
            }

            JDataBase DB = new JDataBase();

            try
            {
                DB.setQuery("delete from dic output deleted.*  where name = N'" + Name + "' and lang = N'" + Lang + "'");
                DataTable dt = DB.Query_DataTable();
                if (dt == null || dt.Rows.Count == 0)
                {
                    return(false);
                }
                ClassLibrary.JHistory jHistory = new ClassLibrary.JHistory();
                jHistory.Save("BusManagment.JDictionary", 0, 0, 0, 0, "حذف از لغت نامه ", "", 0);
                return(true);
            }
            catch
            {
                return(false);
            }
            finally
            {
                DB.Dispose();
            }
        }
Exemple #5
0
 public bool Delete(bool isWeb = false)
 {
     ClassLibrary.JConnection C  = new ClassLibrary.JConnection();
     ClassLibrary.JDataBase   db = new ClassLibrary.JDataBase(C.GetConnection("Server02", 0));
     try
     {
         if (!JPermission.CheckPermission("BusManagment.Bus.JBus.Delete"))
         {
             return(false);
         }
         JBusTable AT = new JBusTable();
         AT.SetValueProperty(this);
         if (AT.Delete(db))
         {
             if (!isWeb)
             {
                 Nodes.Delete(Nodes.CurrentNode);
             }
             ClassLibrary.JHistory jHistory = new ClassLibrary.JHistory();
             jHistory.Save("BusManagment.JBus", AT.Code, 0, 0, 0, "حذف اتوبوس", "", 0);
             return(true);
         }
         else
         {
             return(false);
         }
     }
     finally
     {
         db.Dispose();
     }
 }
Exemple #6
0
        public bool Delete()
        {
            JBusDeviseTable AT = new JBusDeviseTable();

            AT.SetValueProperty(this);
            ClassLibrary.JHistory jHistory = new ClassLibrary.JHistory();
            jHistory.Save("BusManagment.JBusDevise", AT.Code, 0, 0, 0, "حذف دستگاه اتوبوس", "", 0);
            return(AT.Delete());
        }
Exemple #7
0
        public bool Update()
        {
            JBusInstallAndUnistallDeviseTable AT = new JBusInstallAndUnistallDeviseTable();

            AT.SetValueProperty(this);
            ClassLibrary.JHistory jHistory = new ClassLibrary.JHistory();
            jHistory.Save("BusManagment.JBusInstallAndUnistallDevise", AT.Code, 0, 0, 0, "ویرایش نصب و فک دستگاه اتوبوس", "", 0);
            return(AT.Update());
        }
Exemple #8
0
        public bool Update()
        {
            JOwnerTable AT = new JOwnerTable();

            AT.SetValueProperty(this);
            ClassLibrary.JHistory jHistory = new ClassLibrary.JHistory();
            jHistory.Save("BusManagment.JBusOwner", AT.Code, 0, 0, 0, "ویرایش مالک اتوبوس", "", 0);
            return(AT.Update());
        }
Exemple #9
0
        public bool Update()
        {
            JBusPrintReportTable AT = new JBusPrintReportTable();

            AT.SetValueProperty(this);
            ClassLibrary.JHistory jHistory = new ClassLibrary.JHistory();
            //    jHistory.Save("BusManagment.JBusPrintReport", AT.Code, 0, 0, 0, "ویرایش پرینت اتوبوس", "", 0);
            return(AT.Update());
        }
Exemple #10
0
        public bool Update()
        {
            JBusFailureTable AT = new JBusFailureTable();

            AT.SetValueProperty(this);
            ClassLibrary.JHistory jHistory = new ClassLibrary.JHistory();
            jHistory.Save("BusManagment.JBusFailure", AT.Code, 0, 0, 0, "ویرایش دلیل عدم کارکرد اتوبوس", "", 0);
            return(AT.Update());
        }
Exemple #11
0
        public int Insert()
        {
            //if (!JPermission.CheckPermission("BusManagment.NotPayingBus.JNotPayingBus.Insert"))
            //    return 0;
            NotPayingBusTable AT = new NotPayingBusTable();

            AT.SetValueProperty(this);
            Code = AT.Insert();
            ClassLibrary.JHistory jHistory = new ClassLibrary.JHistory();
            jHistory.Save("BusManagment.JNotPayingBus", Code, 0, 0, 0, "ثبت شیفت", "", 0);
            return(Code);
        }
Exemple #12
0
        public int Insert(bool isWeb = false)
        {
            //if (!JPermission.CheckPermission("BusManagment.Query.JQueryAuto.Insert"))
            //    return 0;
            QueryTableAuto AT = new QueryTableAuto();

            AT.SetValueProperty(this);
            Code = AT.Insert();
            ClassLibrary.JHistory jHistory = new ClassLibrary.JHistory();
            jHistory.Save("BusManagment.JQueryAuto", Code, 0, 0, 0, "ثبت کوئری", "", 0);
            return(Code);
        }
Exemple #13
0
        public int Insert(bool isWeb = false)
        {
            //if (!JPermission.CheckPermission("BusManagment.UnpaidBlackList.JUnpaidBlackList.Insert"))
            //    return 0;
            UnpaidBlackListTable AT = new UnpaidBlackListTable();

            AT.SetValueProperty(this);
            Code = AT.Insert();
            ClassLibrary.JHistory jHistory = new ClassLibrary.JHistory();

            jHistory.Save("BusManagment.JUnpaidBlackList", Code, 0, 0, 0, "ثبت در لیست سیاه عدم پرداخت ", "", 0);
            return(Code);
        }
Exemple #14
0
        public int Insert(bool isweb = false)
        {
            if (!JPermission.CheckPermission("BusManagment.OnlineReader.OnlineReaderConfig.Insert"))
            {
                return(0);
            }
            OnlineReaderConfigTable ORC = new OnlineReaderConfigTable();

            ORC.SetValueProperty(this);
            Code = ORC.Insert(0, true);
            ClassLibrary.JHistory jHistory = new ClassLibrary.JHistory();
            jHistory.Save("BusManagment.OnlineReaderConfig", Code, 0, 0, 0, "تنظیمات کارتخوان آنلاین", "", 0);
            return(Code);
        }
Exemple #15
0
        public int Insert(bool isWeb = false)
        {
            if (!JPermission.CheckPermission("BusManagment.Shift.JShift.Insert"))
            {
                return(0);
            }
            ShiftTable AT = new ShiftTable();

            AT.SetValueProperty(this);
            Code = AT.Insert();
            ClassLibrary.JHistory jHistory = new ClassLibrary.JHistory();
            jHistory.Save("BusManagment.JShift", Code, 0, 0, 0, "ثبت شیفت", "", 0);
            return(Code);
        }
Exemple #16
0
        public int Insert(bool isweb = false)
        {
            if (!JPermission.CheckPermission("BusManagment.SMSDetails.JSMSDetails.Insert"))
            {
                return(0);
            }
            JSMSDetailsTable ST = new JSMSDetailsTable();

            ST.SetValueProperty(this);
            Code = ST.Insert(0, true);
            ClassLibrary.JHistory jHistory = new ClassLibrary.JHistory();
            jHistory.Save("BusManagment.JSMSDetails", Code, 0, 0, 0, "جزئیات SMS", "", 0);
            return(Code);
        }
Exemple #17
0
        public int Insert(bool isWeb = false)
        {
            if (!JPermission.CheckPermission("BusManagment.LineSubsidy.JLineSubsidy.Insert"))
            {
                return(0);
            }
            JLineSubsidyTable LST = new JLineSubsidyTable();

            LST.SetValueProperty(this);
            Code = LST.Insert();
            ClassLibrary.JHistory jHistory = new ClassLibrary.JHistory();
            jHistory.Save("BusManagment.JLineSubsidy", Code, 0, 0, 0, "ثبت LineSubsidy", "", 0);
            return(Code);
        }
        public int Insert(bool isWeb = false)
        {
            JLineDailyTransactionCountTable AT = new JLineDailyTransactionCountTable();

            AT.SetValueProperty(this);
            Code = AT.Insert();
            if (Code > 0 && !isWeb)
            {
                Nodes.DataTable.Merge(JLines.GetDataTable(Code));
            }
            ClassLibrary.JHistory jHistory = new ClassLibrary.JHistory();
            jHistory.Save("BusManagment.JLineDailyTransactionCount", Code, 0, 0, 0, "ثبت متوسط درآمد خطوط", "", 0);
            return(Code);
        }
        public bool Update(bool isWeb = false)
        {
            JDataBase DB = new JDataBase();

            DB.setQuery(@"update AUTDailyLineTransactionCount set TransactionCount = " + TransactionCount + " where LineCode = " + LineCode);
            if (DB.Query_Execute() >= 0)
            {
                ClassLibrary.JHistory jHistory = new ClassLibrary.JHistory();
                jHistory.Save("BusManagment.JLineDailyTransactionCount", LineCode, 0, 0, 0, "ویرایش متوسط درآمد خطوط", "", 0);
                return(true);
            }
            else
            {
                return(false);
            }
        }
Exemple #20
0
        public int Insert(bool IsWeb = false)
        {
            if (!JPermission.CheckPermission("BusManagment.SMSMaster.JSMSMaster.Insert"))
            {
                return(0);
            }
            JSMSMasterTable ST = new JSMSMasterTable();

            ST.SetValueProperty(this);
            Code = ST.Insert(0, true);
            ClassLibrary.JHistory jHistory = new ClassLibrary.JHistory();
            jHistory.Save("BusManagment.JSMSMaster", Code, 0, 0, 0, "ثبت کننده SMS", "", 0);


            return(Code);
        }
Exemple #21
0
        public int Insert(JDataBase db = null)
        {
            JBusFailureTable AT = new JBusFailureTable();

            AT.SetValueProperty(this);
            if (db == null)
            {
                Code = AT.Insert();
            }
            else
            {
                Code = AT.Insert(db);
            }
            ClassLibrary.JHistory jHistory = new ClassLibrary.JHistory();
            jHistory.Save("BusManagment.JBusFailure", Code, 0, 0, 0, "ثبت دلیل عدم کارکرد اتوبوس", "", 0);
            return(Code);
        }
Exemple #22
0
        public bool Delete()
        {
            JAUTPaymentTable AT = new JAUTPaymentTable();

            AT.SetValueProperty(this);
            if (AT.Delete())
            {
                Nodes.Delete(Nodes.CurrentNode);
                ClassLibrary.JHistory jHistory = new ClassLibrary.JHistory();
                jHistory.Save("BusManagment.JAUTPayment", AT.Code, 0, 0, 0, "حذف سند پرداخت", "", 0);
                return(true);
            }
            else
            {
                return(false);
            }
        }
Exemple #23
0
        public bool Update(JDataBase pDB)
        {
            JAUTPaymentTable AT = new JAUTPaymentTable();

            AT.SetValueProperty(this);
            if (AT.Update(pDB))
            {
                Nodes.Refreshdata(Nodes.CurrentNode, JAUTPayments.GetDataTable(pDB, Code).Rows[0]);
                ClassLibrary.JHistory jHistory = new ClassLibrary.JHistory();
                jHistory.Save("BusManagment.JAUTPayment", AT.Code, 0, 0, 0, "ویرایش سند پرداخت", "", 0);
                return(true);
            }
            else
            {
                return(false);
            }
        }
Exemple #24
0
        public bool Delete()
        {
            //if (!JPermission.CheckPermission("BusManagment.NotPayingBus.JNotPayingBus.Delete"))
            //    return false;
            NotPayingBusTable AT = new NotPayingBusTable();

            AT.SetValueProperty(this);
            if (AT.Delete())
            {
                ClassLibrary.JHistory jHistory = new ClassLibrary.JHistory();
                jHistory.Save("BusManagment.JNotPayingBus", AT.Code, 0, 0, 0, "حذف شیفت", "", 0);
                return(true);
            }
            else
            {
                return(false);
            }
        }
Exemple #25
0
        public int Insert(JDataBase db = null)
        {
            JBusInstallAndUnistallDeviseTable AT = new JBusInstallAndUnistallDeviseTable();

            AT.SetValueProperty(this);
            if (db == null)
            {
                Code = AT.Insert();
            }
            else
            {
                Code = AT.Insert(db);
            }

            ClassLibrary.JHistory jHistory = new ClassLibrary.JHistory();
            jHistory.Save("BusManagment.JBusInstallAndUnistallDevise", Code, 0, 0, 0, "ثبت نصب و فک دستگاه اتوبوس", "", 0);
            return(Code);
        }
Exemple #26
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);
        }
Exemple #27
0
        public bool Delete()
        {
            //if (!JPermission.CheckPermission("BusManagment.Query.JQueryAuto.Delete"))
            //    return false;
            QueryTableAuto AT = new QueryTableAuto();

            AT.SetValueProperty(this);
            if (AT.Delete())
            {
                ClassLibrary.JHistory jHistory = new ClassLibrary.JHistory();
                jHistory.Save("BusManagment.JQueryAuto", AT.Code, 0, 0, 0, "حذف کوئری", "", 0);
                return(true);
            }
            else
            {
                return(false);
            }
        }
Exemple #28
0
        public int Insert(bool isWeb = false)
        {
            if (!JPermission.CheckPermission("BusManagment.UserDynamicDashboard.JUserDynamicDashboard.Insert"))
            {
                return(0);
            }
            UserDynamicDashboardTable AT = new UserDynamicDashboardTable();

            AT.SetValueProperty(this);
            Code = AT.Insert();
            if (Code > 0 && !isWeb)
            {
                Nodes.DataTable.Merge(JUserDynamicDashboards.GetDataTable(Code));
            }
            ClassLibrary.JHistory jHistory = new ClassLibrary.JHistory();
            jHistory.Save("BusManagment.JUserDynamicDashboard", Code, 0, 0, 0, "ثبت اشخاص دارنده داشبورد", "", 0);
            return(Code);
        }
Exemple #29
0
        public bool Update(bool isWeb = false)
        {
            //if (!JPermission.CheckPermission("BusManagment.UnpaidBlackList.JUnpaidBlackList.Insert"))
            //    return 0;
            UnpaidBlackListTable AT = new UnpaidBlackListTable();

            AT.SetValueProperty(this);
            if (AT.Update())
            {
                ClassLibrary.JHistory jHistory = new ClassLibrary.JHistory();
                jHistory.Save("BusManagment.JUnpaidBlackList", AT.Code, 0, 0, 0, "ویرایش لیست سیاه عدم پرداخت", "", 0);
                return(true);
            }
            else
            {
                return(false);
            }
        }
Exemple #30
0
 public bool CascadeDelete(JDataBase db)
 {
     BusManagment.Documents.JAUTDocument document1 = new BusManagment.Documents.JAUTDocument();
     document1.Code = 400000000 + Code;
     {
         if (document1.CascadeDelete(db))
         {
             BusManagment.Documents.JAUTDocument document2 = new BusManagment.Documents.JAUTDocument();
             document2.Code = 700000000 + Code;
             {
                 if (document1.CascadeDelete(db))
                 {
                     JAUTPaymentTable AT = new JAUTPaymentTable();
                     AT.SetValueProperty(this);
                     if (JAUTPaymentDetails.Delete(db, this.Code))
                     {
                         if (AT.Delete(db))
                         {
                             ClassLibrary.JHistory jHistory = new ClassLibrary.JHistory();
                             jHistory.Save("BusManagment.JAUTPayment", AT.Code, 0, 0, 0, "حذف سند پرداخت و جزئیات", "", 0);
                             return(true);
                         }
                         else
                         {
                             return(false);
                         }
                     }
                     else
                     {
                         return(false);
                     }
                 }
                 else
                 {
                     return(false);
                 }
             }
         }
         else
         {
             return(false);
         }
     }
 }