Esempio n. 1
0
        public frmEH_Launch(HMConnection.HMCon Connection, TUC_HMDevXManager.TUC_HMDevXManager DevXMgr, int AP_INV_HEADER_ID)
        {
            this.Connection = Connection;
            this.DevXMgr    = DevXMgr;
            InitializeComponent();

            ucHistoryView1              = new SubmissionHistory.ucHistoryView();
            ucHistoryView1.Dock         = DockStyle.Fill;
            ucHistoryView1.Parent       = this;
            ucHistoryView1.TypeID       = CONST_SUB_PAYMENT_REQUEST;
            ucHistoryView1.HMConnection = Connection;
            ucHistoryView1.TUC_DevXMgr  = DevXMgr;

            object CLog_FieldLink_ID = Connection.SQLExecutor.ExecuteScalar("exec dbo.sp_WS_ChatFieldLinkGetID 'WS_INV_HEADER.WS_INV_ID', 'PayApproval'", Connection.TRConnection);

            ucHistoryView1.ChatFieldLink = Convert.ToInt32(CLog_FieldLink_ID);

            string sSQL       = @"select ws_inv_id from ws_inv_header where ap_inv_header_id=" + AP_INV_HEADER_ID;
            object oWS_INV_ID = Connection.SQLExecutor.ExecuteScalar(sSQL, Connection.TRConnection);

            if (oWS_INV_ID == null || oWS_INV_ID == DBNull.Value)
            {
                oWS_INV_ID = -1;
            }
            ucHistoryView1.DetailID = Convert.ToInt32(oWS_INV_ID);
            ucHistoryView1.LoadHistory();
        }
Esempio n. 2
0
        public static void LoadRules(HMConnection.HMCon Connection, DataRow drSrc, int InsurType_ID)
        {
            string    sSQL = @"select isnull(rule_warning,'F') [rule_warning], isnull(rule_accrual,'F') [rule_accrual], isnull(rule_payment,'F') [rule_payment], 
                isnull(rule_po,'F') [rule_po], isnull(webrule_internal_alert,'F') [webrule_internal_alert], isnull(webrule_warn_contractor,'F') [webrule_warn_contractor], 
                isnull(webrule_restrict_payment_req,'F') [webrule_restrict_payment_req], isnull(rule_restrict,'F') [rule_restrict], isnull(rule_holdback_release,'F') [rule_holdback_release]
            from SUPPLIER_SUBCON_INSUR_TYPE
            where id=" + InsurType_ID;
            DataTable dt   = Connection.SQLExecutor.ExecuteDataAdapter(sSQL, Connection.TRConnection);

            if (dt != null)
            {
                if (dt.Rows.Count > 0)
                {
                    DataRow dr = dt.Rows[0];
                    if (dr != null)
                    {
                        drSrc.BeginEdit();
                        drSrc["rule_warning"]                 = dr["rule_warning"];
                        drSrc["rule_accrual"]                 = dr["rule_accrual"];
                        drSrc["rule_payment"]                 = dr["rule_payment"];
                        drSrc["rule_po"]                      = dr["rule_po"];
                        drSrc["webrule_internal_alert"]       = dr["webrule_internal_alert"];
                        drSrc["webrule_warn_contractor"]      = dr["webrule_warn_contractor"];
                        drSrc["webrule_restrict_payment_req"] = dr["webrule_restrict_payment_req"];
                        drSrc["rule_restrict"]                = dr["rule_restrict"];
                        drSrc["rule_holdback_release"]        = dr["rule_holdback_release"];
                        drSrc.EndEdit();
                    }
                }
            }
        }
Esempio n. 3
0
        public PeriodsAdmin(HMConnection.HMCon hmConObject, TUC_HMDevXManager.TUC_HMDevXManager dxMgr)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            periods        = new GL_Periods.UserControl1(hmConObject);
            dxManager      = dxMgr;
            periods.Style  = dxMgr;
            periods.Parent = this;
            periods.Dock   = DockStyle.Fill;

            foreach (DevExpress.XtraLayout.BaseLayoutItem itm in periods.loControl.Items)
            {            //first remove the layout controlItem
                if (itm.Name == "layoutControlItem4")
                {
                    itm.Dispose();
                    break;
                }
            }
            foreach (Control ctrl in periods.loControl.Controls)
            {            //then remove the control in the item
                if (ctrl.Name == "btnUpdate")
                {
                    ctrl.Visible = false;
                    ctrl.Enabled = false;
                    periods.loControl.Controls.Remove(ctrl);
                    break;
                }
            }
        }
Esempio n. 4
0
        public Purchaser(HMConnection.HMCon Connection, int Purchaser_ID)
        {
            string    sSQL = @"select isnull(NAME,''), isnull(BILL_ADDRESS_1,''), isnull(BILL_ADDRESS_2,''), isnull(BILL_ADDRESS_3,''), 
                isnull(BILL_CITY,''), isnull(BILL_STATE,''), isnull(BILL_ZIP ,'') 
                from CUSTOMERS 
                where CUSTOMER_ID=" + Purchaser_ID;
            DataTable dt   = Connection.SQLExecutor.ExecuteDataAdapter(sSQL, Connection.TRConnection);

            if (dt != null)
            {
                if (dt.Rows.Count > 0)
                {
                    DataRow dr = dt.Rows[0];
                    if (dr != null)
                    {
                        _Name   = dr[0].ToString();
                        _Addr1  = dr[1].ToString();
                        _Addr2  = dr[2].ToString();
                        _Addr3  = dr[3].ToString();
                        _City   = dr[4].ToString();
                        _Prov   = dr[5].ToString();
                        _Postal = dr[6].ToString();
                    }
                }
            }
        }
 public ucSetup_WorkClasses(HMConnection.HMCon pConn, TUC_HMDevXManager.TUC_HMDevXManager pDevMg)
 {
     InitializeComponent();
     hmConn   = pConn;
     hmDevMgr = pDevMg;
     sqlConnTR.ConnectionString = hmConn.TRConnection;
     LoadUserControls();
 }
Esempio n. 6
0
 public ucLevyMatch(HMConnection.HMCon Connection, TUC_HMDevXManager.TUC_HMDevXManager DevXMgr)
 {
     this.Connection = Connection;
     this.DevXMgr    = DevXMgr;
     Popup           = new WS_Popups.frmPopup(DevXMgr);
     InitializeComponent();
     RunSetups();
 }
Esempio n. 7
0
 public ucSetup_OvertimeLimits_BillingThresholds(HMConnection.HMCon pConn, TUC_HMDevXManager.TUC_HMDevXManager pDevMg)
 {
     InitializeComponent();
     hmConn   = pConn;
     hmDevMgr = pDevMg;
     sqlConnTR.ConnectionString  = hmConn.TRConnection;
     sqlConnTR1.ConnectionString = hmConn.TRConnection;
     LoadUserControls();
 }
Esempio n. 8
0
 public ucCommPurDocMerge(HMConnection.HMCon pConn, TUC_HMDevXManager.TUC_HMDevXManager pDevMgr, int pAlertPointID)
 {
     InitializeComponent();
     hmConn       = pConn;
     hmDevMgr     = pDevMgr;
     AlertPointID = pAlertPointID;
     sqlConnTR.ConnectionString = hmConn.TRConnection;
     Popups = new WS_Popups.frmPopup(this.hmDevMgr);
 }
Esempio n. 9
0
 public ucStakeholderType(HMConnection.HMCon con, TUC_HMDevXManager.TUC_HMDevXManager tuc, int AlertPoint)
 {
     InitializeComponent();
     Connection  = con;
     DevXMgr     = tuc;
     _AlertPoint = AlertPoint;
     TR_Conn.ConnectionString = Connection.TRConnection;
     daAlert_PC_Stakeholder.SelectCommand.Parameters["@AlertID"].Value = _AlertPoint;
 }
Esempio n. 10
0
 public frmLoadBurdens(HMConnection.HMCon pReflexCon, TUC_HMDevXManager.TUC_HMDevXManager pStyle, int piPri_ID)
 {
     InitializeComponent();
     ReflexCon = pReflexCon;
     dxStyle   = pStyle;
     iPri_ID   = piPri_ID;
     sqlConnTR.ConnectionString = ReflexCon.TRConnection;
     GGBurden             = new TUC_GridG.GridG(ReflexCon.CompanyServer, ReflexCon.TRDB, gvSelectableBurdens, daBurdenSelection, dsBurdenSelection1);
     Popups               = new WS_Popups.frmPopup(dxStyle);
     tcMain.ShowTabHeader = DevExpress.Utils.DefaultBoolean.False;
 }
Esempio n. 11
0
 public frmDocHotLink(HMConnection.HMCon Connection, TUC_HMDevXManager.TUC_HMDevXManager DevXMgr, string RelType, int RelType_ID, int Supplier_ID)
 {
     this.Connection = Connection;
     this.DevXMgr    = DevXMgr;
     _RelType_ID     = RelType_ID;
     _RelType        = RelType;
     _Supplier_ID    = Supplier_ID;
     Popup           = new WS_Popups.frmPopup(DevXMgr);
     InitializeComponent();
     RunSetups();
 }
Esempio n. 12
0
        public frmLoadEquiClasses(HMConnection.HMCon pReflexCon, TUC_HMDevXManager.TUC_HMDevXManager pStyle, int piPri_ID)
        {
            InitializeComponent();

            ReflexCon = pReflexCon;
            dxStyle   = pStyle;
            iPri_ID   = piPri_ID;

            sqlTR.ConnectionString = ReflexCon.TRConnection;
            tcMain.ShowTabHeader   = DevExpress.Utils.DefaultBoolean.False;
        }
Esempio n. 13
0
        private void LoadBurden()
        {
            this.hmDevManager = new TUC_HMDevXManager.TUC_HMDevXManager();
            hmConn            = new HMConnection.HMCon("web_eric", @"dev-sql2014\dev2014", 12, "Eric");


            WO_Setup.ucSetup_Burden loadBurden = new WO_Setup.ucSetup_Burden(hmConn, hmDevManager);
            loadBurden.Dock   = DockStyle.Fill;
            loadBurden.Parent = xtraTabPage1;

            loadBurden.LoadBurdens(2, false);
        }
Esempio n. 14
0
        public avPODocDetail(HMConnection.HMCon hmCon, TUC_HMDevXManager.TUC_HMDevXManager tuc)
        {
            InitializeComponent();

            this.HMConnection = hmCon;
            this.TUC_DevXMgr  = tuc;

            CFS_FileMgr = new WO_CentralizedFSManager.ucFileManager(hmCon, tuc,
                                                                    WO_CentralizedFSManager.DocumentViewerMode.All, RelTypePO, -1, true, "PO");
            CFS_FileMgr.Dock   = DockStyle.Fill;
            CFS_FileMgr.Parent = this;
            CFS_FileMgr.BringToFront();
        }
Esempio n. 15
0
        public Form1()
        {
            InitializeComponent();

            // _HMCon = new HMConnection.HMCon("web_imark", @"dev-sql2014\dev2014", 12, "Adam");
            // _HMCon = new HMConnection.HMCon("web_eric", @"dev-sql2014\dev2014", 12, "Eric");
            _HMCon = new HMConnection.HMCon("web_strike_test", @"dev11", 12, "Adam");
            // _HMCon = new HMConnection.HMCon("web_dmd_qa_rat", @"csmsql2012", 12, "John");

            _TUC = new TUC_HMDevXManager.TUC_HMDevXManager();

            Start_ProjectCostingEmployeeScheduling();
        }
Esempio n. 16
0
        public avChat(HMConnection.HMCon hmCon, TUC_HMDevXManager.TUC_HMDevXManager tuc)
        {
            InitializeComponent();

            this.HMConnection = hmCon;
            this.TUC_DevXMgr  = tuc;


            _ucChat        = new ReflexChat.ucChat(hmCon, tuc, ReflexChat.ChatType.Default);
            _ucChat.Dock   = DockStyle.Fill;
            _ucChat.Parent = this;
            _ucChat.BringToFront();
        }
Esempio n. 17
0
        public Form1()
        {
            InitializeComponent();

            // _HMCon = new HMConnection.HMCon("web_imark", @"dev-sql2014\dev2014", 12, "Adam");
            _HMCon = new HMConnection.HMCon("web_eric", @"dev-sql2014\dev2014", 12, "Eric");
            // _HMCon = new HMConnection.HMCon("web_strike_test", @"dev11", 12, "Adam");
            // _HMCon = new HMConnection.HMCon("web_dmd_qa_rat", @"csmsql2012", 12, "John");

            _TUC = new TUC_HMDevXManager.TUC_HMDevXManager();

            Start_AlertAdministration();
        }
Esempio n. 18
0
        public avWebPODetails(HMConnection.HMCon hmCon, TUC_HMDevXManager.TUC_HMDevXManager tuc)
        {
            InitializeComponent();

            this.HMConnection = hmCon;
            this.TUC_DevXMgr  = tuc;


            _ucWebPODetails            = new ucWebPODetails(hmCon, tuc);
            _ucWebPODetails.IsWorkFlow = false;
            _ucWebPODetails.Dock       = DockStyle.Fill;
            _ucWebPODetails.Parent     = this;
            _ucWebPODetails.BringToFront();
        }
Esempio n. 19
0
        public ucWFPODetail(HMConnection.HMCon Connection, TUC_HMDevXManager.TUC_HMDevXManager DevXMgr)
        {
            this.Connection = Connection;
            this.DevXMgr    = DevXMgr;

            InitializeComponent();

            TR_Conn.ConnectionString = Connection.TRConnection;

            this.daWF_Route.SelectCommand.CommandText =
                daWF_Route.SelectCommand.CommandText.Replace("web_strike_test", Connection.WebDB);

            InitializeFileManager();
            SetupStatusDT();
        }
Esempio n. 20
0
        public frmSecurity(HMConnection.HMCon conn, TUC_HMDevXManager.TUC_HMDevXManager tuc_HMDevXManager, int sq_id, bool _securityEnabled, DataTable _datasource)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            //
            // TODO: Add any constructor code after InitializeComponent call
            //
            this.DataSource      = _datasource;
            this.securityEnabled = _securityEnabled;
            this.hmConn          = conn;
            this.HMDevXManager1  = tuc_HMDevXManager;
            this.sQueryID        = sq_id;
        }
Esempio n. 21
0
        //----------------------------------------------------------------------------------

        #region ---Events Used---

        private void btnPeriodLookup_Click(object sender, System.EventArgs e)
        {
            if (this.ConnectionString != "")
            {
                //  WebConnection.txt
                StreamReader sReader   = File.OpenText(filePathName);
                string       webServer = "";
                string       webDBName = "";
                int          companyID = 0;



                try
                {
                    webServer = sReader.ReadLine();
                    webDBName = sReader.ReadLine();
                    sReader.Close();
                    int                trIndex    = this.ConnectionString.ToUpper().IndexOf("TR_");
                    int                trEndIndex = this.ConnectionString.IndexOf(";", trIndex);
                    string             trDBName   = this.ConnectionString.Substring(trIndex, (trEndIndex - trIndex));
                    HMConnection.HMCon con        = new HMConnection.HMCon();
                    SqlConnection      conn       = new SqlConnection(con.GetConnectionString(webServer, webDBName));
                    SqlCommand         cmd        = new SqlCommand();
                    cmd.Connection  = conn;
                    cmd.CommandText = "select AutoID from COMPANIES where TreasuryDBName = '" + trDBName + "'";
                    cmd.Connection.Open();
                    if (cmd.ExecuteScalar() != null)
                    {
                        companyID = (int)cmd.ExecuteScalar();
                    }
                    cmd.Connection.Close();
                }
                catch (SqlException ex)
                {
                    System.Windows.Forms.MessageBox.Show(ex.Message);
                }


                HMConnection.HMCon conObject = new HMConnection.HMCon(webDBName, webServer, companyID, m_user);
                using (PeriodsAdmin pdsAdmin = new PeriodsAdmin(conObject, dxmgr))
                {
                    pdsAdmin.ShowDialog();
                }
                this.setDefaults();
            }
        }
Esempio n. 22
0
        public ucWebPODetails(HMConnection.HMCon hmCon, TUC_HMDevXManager.TUC_HMDevXManager tuc)
        {
            InitializeComponent();
            _HMCon = hmCon;
            _TUC   = tuc;


            this.TRCon.ConnectionString = hmCon.TRConnection;

            this.daWF_Route.SelectCommand.CommandText =
                daWF_Route.SelectCommand.CommandText.Replace("web_strike_test", _HMCon.WebDB);

            this.WS_PCPO_ID_PropertyValueChanged += new del_WS_PCPO_ID_PropertyValueChanged(ucWebPODetails_WS_PCPO_ID_PropertyValueChanged);

            InitializeChat();
            InitializeFileManager();
            InitializeEventHistoryView();

            _TUC.FormInit(gcDetails);
            _TUC.FormInit(gcSubmissionDetails_Grid);
        }
Esempio n. 23
0
        public frmLevySelect(HMConnection.HMCon Connection, TUC_HMDevXManager.TUC_HMDevXManager DevXMgr, int AP_INV_HEADER_ID)
        {
            this.Connection       = Connection;
            this.DevXMgr          = DevXMgr;
            this.AP_INV_HEADER_ID = AP_INV_HEADER_ID;
            CBOUtil = new ComboSearch.Util(DevXMgr);
            Popup   = new WS_Popups.frmPopup(DevXMgr);

            string sSQL         = @"select supplier_id 
                from AP_INV_HEADER a 
                join SUPPLIER_MASTER s on s.SUPPLIER=a.SUPPLIER
                where a.AP_INV_HEADER_ID=" + AP_INV_HEADER_ID;
            object oSupplier_ID = Connection.SQLExecutor.ExecuteScalar(sSQL, Connection.TRConnection);

            if (oSupplier_ID == null || oSupplier_ID == DBNull.Value)
            {
                oSupplier_ID = -1;
            }
            Supplier_ID = Convert.ToInt32(oSupplier_ID);

            sSQL = @"select count(*) 
                from supplier_master 
                where isnull(one_check,'F')='T' and supplier_id=" + Supplier_ID;
            object oCNT = Connection.SQLExecutor.ExecuteScalar(sSQL, Connection.TRConnection);

            if (oCNT == null || oCNT == DBNull.Value)
            {
                oCNT = 0;
            }

            if (Convert.ToInt32(oCNT) == 1)
            {
                MiscSupplier = true;
            }

            InitializeComponent();
            daLevySearch.SelectCommand.Parameters["@username"].Value = Connection.MLUser;
            RunSetups();
        }
Esempio n. 24
0
        private void LoadUserControls()
        {
            this.hmDevManager = new TUC_HMDevXManager.TUC_HMDevXManager();
            //hmConn = new HMConnection.HMCon("web_eric", @"dev-sql2014\dev2014", 12, "Eric");
            //   hmConn = new HMConnection.HMCon("web_strike_test", @"dev11", 12, "adam");
            hmConn = new HMConnection.HMCon("web_test_v11", "dev12", 12, "ying");


            WO_Setup.ucSetup_Burden loadBurden = new WO_Setup.ucSetup_Burden(hmConn, hmDevManager);
            loadBurden.Dock   = DockStyle.Fill;
            loadBurden.Parent = xtraTabPage1;

            loadBurden.LoadBurdens(1, false);

            WO_Setup.ucSetup_WorkClasses workClass = new WO_Setup.ucSetup_WorkClasses(hmConn, hmDevManager);
            workClass.Dock   = DockStyle.Fill;
            workClass.Parent = xtraTabPage2;
            workClass.LoadCostingWorkClass(1, false);

            WO_Setup.ucSetup_EqiClasses EqiClasses = new WO_Setup.ucSetup_EqiClasses(hmConn, hmDevManager);
            EqiClasses.Dock   = DockStyle.Fill;
            EqiClasses.Parent = xtraTabPage3;
            EqiClasses.LoadCostingEqiClass(443, false);   ///50
        }
Esempio n. 25
0
        public Form1()
        {
            InitializeComponent();

            hmConn = new HMConnection.HMCon("web_qa_re", "CSMSQL2012", 12, "ying");
            //hmConn = new HMConnection.HMCon("WEB_DEMO_MASTER_V11", "REFLEXDEMOSERV", 12, "ying");
            hmDevMgr = new TUC_HMDevXManager.TUC_HMDevXManager();

            List <IMapLayer> layers     = new List <IMapLayer>();
            MapShapeLayer    shapeLayer = new MapShapeLayer()
            {
                LinkTable  = "Test",
                LinkColumn = "Asset Code"
            };

            shapeLayer.Attributes.Add(new AttrInfo("Category", "Category"));
            shapeLayer.Attributes.Add(new AttrInfo("Location", "Location"));
            shapeLayer.Attributes.Add(new AttrInfo("Asset Code", "Asset Code"));
            layers.Add(shapeLayer);

            MapPointLayer pointLayer = new MapPointLayer()
            {
                LinkTable  = "Test",
                LinkColumn = "Asset Code",
            };

            pointLayer.Attributes.Add(new AttrInfo("Desc", "Description"));
            pointLayer.Attributes.Add(new AttrInfo("Asset Code", "Asset Code"));
            //pointLayer.HilightMarkerSymbol = new PictureMarkerSymbol();
            //((PictureMarkerSymbol)pointLayer.HilightMarkerSymbol).SetSourceAsync(new System.Uri("http://static.arcgis.com/images/Symbols/Basic/GoldShinyPin.png"));
            //pointLayer.MarkerSymbol = new PictureMarkerSymbol();
            //((PictureMarkerSymbol)pointLayer.MarkerSymbol).SetSourceAsync(new System.Uri("http://static.arcgis.com/images/Symbols/Basic/GreenShinyPin.png"));
            layers.Add(pointLayer);

            MapLineLayer lineLayer = new MapLineLayer()
            {
                LinkTable  = "Test",
                LinkColumn = "Asset Code"
            };

            lineLayer.Attributes.Add(new AttrInfo("Category", "Category"));
            lineLayer.Attributes.Add(new AttrInfo("Location", "Location"));
            lineLayer.Attributes.Add(new AttrInfo("Asset Code", "Asset Code"));
            layers.Add(lineLayer);

            var eventList = MapEventLayer.GetEventLayers(hmConn, "Test", "Asset Code");

            layers.AddRange(eventList);

            string sql = $"exec sp_FA_SearchBuildingAssets '{hmConn.MLUser}E', 'E'";

            hmConn.SQLExecutor.ExecuteNonQuery(sql, hmConn.TRConnection);

            sql = $"SELECT distinct eqi_code, [Asset Code], Description, Category, Class, Location " +
                  $"FROM working_Fixed_Assets_search WHERE(username = '******')";

            var table = hmConn.SQLExecutor.ExecuteDataAdapter(sql, hmConn.TRConnection);

            gc.DataSource = table;

            gv.Columns.ToList().ForEach(x => x.Caption = x.Name + "Cap");

            ucMap1.Init(hmConn, hmDevMgr, gv, layers);
        }