public frmPOSelect(HMCon Connection, TUC_HMDevXManager.TUC_HMDevXManager DevXMgr, bool ShowContractPOSummary) { this.Connection = Connection; this.myMgr = DevXMgr; InitializeComponent(); ucMPOR = new ucMatchPOReceipt(Connection, DevXMgr); ucMPOR.Parent = xtraTabPage1; ucMPOR.Dock = DockStyle.Fill; ucMPOR.ResetSize(); ucUCPO = new ucUnreleasedContractPO(Connection, DevXMgr); ucUCPO.Parent = xtraTabPage2; ucUCPO.Dock = DockStyle.Fill; ucUCPO.ResetSize(); ucSummCPO = new ucSummaryContractPO(Connection, DevXMgr); ucSummCPO.Parent = xtraTabPage3; ucSummCPO.Dock = DockStyle.Fill; if (!ShowContractPOSummary) { xtraTabPage3.PageVisible = false; } else { xtraTabPage2.PageVisible = false; } }
public UserExceptions(HMConnection.HMCon Connection, TUC_HMDevXManager.TUC_HMDevXManager DevXMgr, int AlertPointID) { this.Connection = Connection; this.DevXMgr = DevXMgr; this.AlertPointID = AlertPointID; Popup = new frmPopup(DevXMgr); InitializeComponent(); TR_Conn.ConnectionString = this.Connection.TRConnection; WEB_Conn.ConnectionString = this.Connection.WebConnection; string sSelect = "select isnull(alert,'') from ApplicationAlertPoint where id=" + AlertPointID; this.Text = "Alert: " + Connection.SQLExecutor.ExecuteScalar(sSelect, Connection.TRConnection); daUser.SelectCommand.CommandText = "SELECT u.NAME, d.DESCRIPTION " + "FROM MLUSER u " + "LEFT OUTER JOIN DEPARTMENT d ON d.NAME = u.DEPARTMENT " + "where u.name not in ( select mluser from AlertPointAccess where AAP_ID=" + AlertPointID + " ) " + "ORDER BY d.DESCRIPTION, u.NAME"; daExceptions.SelectCommand.Parameters["@aap_id"].Value = AlertPointID; daExceptions.Fill(dsExceptions1); daDepartment.Fill(dsDepartment1); daUser.Fill(dsUser1); daUserDep.Fill(dsUserDep1); }
public void Init(HMCon con, TUC_HMDevXManager.TUC_HMDevXManager hmDevMgr, GridView gv, List <IMapLayer> layers, List <PosGenerator> posGens) { _hmCon = con; _hmDevMgr = hmDevMgr; _gv = gv; _layers = layers; _posGens = posGens; linkGen.Enabled = _posGens != null; _pop = new frmPopup(_hmDevMgr); if (!ArcGISRuntimeEnvironment.IsInitialized) { try { //ArcGISRuntimeEnvironment.InstallPath = Application.StartupPath; ArcGISRuntimeEnvironment.ClientId = "EdzP18VEt80l7prT"; ArcGISRuntimeEnvironment.Initialize(); } catch (Exception ex) { _pop.ShowPopup($"Unable to initialize the ArcGIS Runtime with the client ID provided: {ex.Message}"); } } _hmDevMgr.FormInit(this); }
public bool RecordExist(HMCon hmCon, string keyCode) { string sql = $"select count(*) from Geo_Link where LinkTableName='{LinkTable}' and Feature='{LayerName}' and LinkCode='{keyCode}'"; int count = Convert.ToInt32(hmCon.SQLExecutor.ExecuteScalar(sql, hmCon.TRConnection)); return(count > 0); }
static public List <IGeoInfo> GetDataList(HMCon hmConn, List <DataRow> rowList, IMapLayer layer) { if (rowList.Count == 0) { return(new List <IGeoInfo>()); } string linkCodeList = GetContentListString(rowList, layer.LinkColumn); if (layer is MapPointLayer) { return(GetPointList(hmConn, rowList, layer.ConvertTo <MapPointLayer>(), linkCodeList)); } else if (layer is MapShapeLayer) { return(GetShapeList(hmConn, rowList, layer.ConvertTo <MapShapeLayer>(), linkCodeList)); } else if (layer is MapLineLayer) { return(GetLineList(hmConn, rowList, layer.ConvertTo <MapLineLayer>(), linkCodeList)); } else if (layer is MapEventLayer) { return(GetEventList(hmConn, rowList, layer.ConvertTo <MapEventLayer>(), linkCodeList)); } return(null); }
static private List <IGeoInfo> GetEventList(HMCon hmConn, List <DataRow> rowList, MapEventLayer layer, string linkCodeList) { List <IGeoInfo> infoList = CreateList <EventGeoInfo>(layer, rowList); string sql = $"select * from Geo_Event where EventTypeId ='{layer.TypeId}' and LinkCode in ({linkCodeList})"; var eventTable = hmConn.SQLExecutor.ExecuteDataAdapter(sql, hmConn.TRConnection); foreach (var row in rowList) { EventGeoInfo info = infoList.Find(x => x.KeyCode == $"{row[layer.LinkColumn]}").ConvertTo <EventGeoInfo>(); var linkRows = eventTable.Select($"LinkCode='{row[layer.LinkColumn]}'"); foreach (DataRow data in linkRows) { EventDetails eve = new EventDetails(); eve.Id = (int)data["Id"]; eve.TypeId = layer.TypeId; eve.EventType = layer.EventTypeName; eve.Date = (DateTime)data["EventDate"]; eve.Point = new MapPoint(double.Parse(data["Longitude"].ToString()), double.Parse(data["Latitude"].ToString()), SpatialReferences.Wgs84); eve.Description = (string)data["Description"]; info.EventList.Add(eve); } } return(infoList); }
public frmAppDec(HMCon Connection, TUC_HMDevXManager.TUC_HMDevXManager DevXMgr) { this.Connection = Connection; this.DevXMgr = DevXMgr; Popup = new frmPopup(DevXMgr); InitializeComponent(); }
public SupplierSubConValidator(HMCon Connection, TUC_HMDevXManager.TUC_HMDevXManager DevXMgr) { this.Connection = Connection; this.DevXMgr = DevXMgr; Popup = new frmPopup(DevXMgr); RunSetups(); }
public ucDrawBase CreateInstance(HMCon con, TUC_HMDevXManager.TUC_HMDevXManager hmDevMgr, WpfMapDrawBase map, IMapLayer info, int layerIndex) { if (info is MapPointLayer) { return(new ucDrawPoint(con, hmDevMgr, map, info.ConvertTo <MapPointLayer>(), layerIndex)); } else if (info is MapShapeLayer) { return(new ucDrawShape(con, hmDevMgr, map, info.ConvertTo <MapShapeLayer>(), layerIndex)); } else if (info is MapLineLayer) { return(new ucDrawLine(con, hmDevMgr, map, info.ConvertTo <MapLineLayer>(), layerIndex)); } else if (info is MapEventLayer) { if (_eventDrawer == null) { _eventDrawer = new ucDrawEvents(con, hmDevMgr, map, info.ConvertTo <MapEventLayer>(), layerIndex); return(_eventDrawer); } else { _eventDrawer.AddEventLayer(info.ConvertTo <MapEventLayer>(), layerIndex); return(null); } } return(null); }
public ucSuppChange(HMCon Connection, TUC_HMDevXManager.TUC_HMDevXManager DevXMgr) { this.Connection = Connection; this.DevXMgr = DevXMgr; InitializeComponent(); RunSetups(); }
public fLauncher(HMCon Connection, TUC_HMDevXManager.TUC_HMDevXManager DevXMgr, int AlertID) { this.Connection = Connection; this.DevXMgr = DevXMgr; _AlertID = AlertID; InitializeComponent(); LoadAlertProperty(); }
public ucSupplierView(HMCon Connection, TUC_HMDevXManager.TUC_HMDevXManager DevXMgr) { this.Connection = Connection; this.DevXMgr = DevXMgr; Popup = new frmPopup(DevXMgr); InitializeComponent(); RunSetups(); }
public ucMasterView(HMCon Connection, TUC_HMDevXManager.TUC_HMDevXManager DevXMgr) { this.Connection = Connection; this.DevXMgr = DevXMgr; CBOUtil = new ComboSearch.Util(DevXMgr); Popup = new frmPopup(DevXMgr); InitializeComponent(); RunSetups(); }
public ucAPPaymentRequest(HMCon Connection, TUC_HMDevXManager.TUC_HMDevXManager DevXMgr, KeyControlAccess.Validator KCA_Validator) { this.Connection = Connection; this.DevXMgr = DevXMgr; this.KCA_Validator = KCA_Validator; Popup = new frmPopup(DevXMgr); InitializeComponent(); RunSetups(); }
public frmManChk(HMCon Connection, TUC_HMDevXManager.TUC_HMDevXManager DevXMgr, string sSupplier, int iAP_INV_HEADER_ID) { this.Connection = Connection; this.myMgr = DevXMgr; this.Popup = new frmPopup(myMgr); _Supplier = sSupplier; _AP_INV_HEADER_ID = iAP_INV_HEADER_ID; InitializeComponent(); TR_Conn = new SqlConnection(Connection.TRConnection); }
public void Save(HMCon hmCon, string keyCode, double lat, double lon) { string sql = $"insert into Geo_Point( Latitude, Longitude, TimeStamp) " + $"values({lat}, {lon}, '{DateTime.Now.ToShortDateString()}'); SELECT SCOPE_IDENTITY()"; int pointId = Convert.ToInt32(hmCon.SQLExecutor.ExecuteScalar(sql, hmCon.TRConnection)); sql = $"insert into Geo_Link(LinkTableName, LinkCode, Feature, LinkType, LinkId)" + $" values('{LinkTable}','{keyCode}', '{LayerName}', {(int)GeoType.Point}, {pointId})"; hmCon.SQLExecutor.ExecuteNonQuery(sql, hmCon.TRConnection); }
public XtraForm1() { Connection = new HMCon("web_strike_test", "dev11", 12, "adam"); DevXMgr = new TUC_HMDevXManager.TUC_HMDevXManager(); InitializeComponent(); AP_PaymentReqApp.ucAPPaymentRequest uc = new AP_PaymentReqApp.ucAPPaymentRequest(Connection, DevXMgr); uc.Dock = DockStyle.Fill; uc.Parent = this; }
public frmAP(string WebDB, string Server, string CompanyID, string User) { TUC_HMDevXManager.TUC_HMDevXManager DevXMgr = new TUC_HMDevXManager.TUC_HMDevXManager(); DevXMgr.AppInit(User); Connection = new HMCon(WebDB, Server, Convert.ToInt32(CompanyID), User); Popup = new WS_Popups.frmPopup(DevXMgr); InitializeComponent(); AP = new ucAP.ucAP(WebDB, Server, CompanyID, User, DevXMgr); AP.Dock = DockStyle.Fill; AP.Parent = this; }
public ucDrawPoint(HMCon con, TUC_HMDevXManager.TUC_HMDevXManager hmDevMgr, WpfMapDrawBase map, MapPointLayer layer, int layerIndex) : base(con, hmDevMgr, map) { InitializeComponent(); _layer = layer; _layerIndex = layerIndex; gcAttr.DataSource = _attrTable; InDrawingStatus(false); }
public ucDrawBase(HMCon con, TUC_HMDevXManager.TUC_HMDevXManager hmDevMgr, WpfMapDrawBase map) { _hmCon = con; _hmDevMgr = hmDevMgr; _pop = new frmPopup(hmDevMgr); _map = map; _attrTable = new DataTable(); _attrTable.Columns.Add(new DataColumn("Attribute")); _attrTable.Columns.Add(new DataColumn("Value")); }
public Form1() { DevXMgr = new TUC_HMDevXManager.TUC_HMDevXManager(); DevXMgr.AppInit("adam"); // Connection = new HMCon("web_strike_test", "dev1", 12, "adam"); Connection = new HMCon("web_comco", "dev4", 12, "ying"); InitializeComponent(); AP_SubcontractorCompliance.ucMasterView mast = new AP_SubcontractorCompliance.ucMasterView(Connection, DevXMgr); mast.RefreshDS(); mast.Dock = DockStyle.Fill; mast.Parent = this; }
public ucWebInvDet(HMConnection.HMCon Connection, TUC_HMDevXManager.TUC_HMDevXManager DevXMgr) : this() { this.Connection = Connection; this.DevXMgr = DevXMgr; Popup = new frmPopup(DevXMgr); LoadConnectionDefaults(); ucHistoryView1.TypeID = CONST_SUB_PAYMENT_REQUEST; lciSave.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never; DetNonEditable(); }
public frmGSTExcept(HMCon Connection, TUC_HMDevXManager.TUC_HMDevXManager DevXMgr) { this.Connection = Connection; this.myMgr = DevXMgr; Popup = new frmPopup(myMgr); InitializeComponent(); TR_Conn = new SqlConnection(Connection.TRConnection); ucAPGSTE = new ucAPGSTException(Connection, myMgr); ucAPGSTE.Parent = xtraTabPage1; ucAPGSTE.Dock = DockStyle.Fill; ucAPGSTE.Readonly = false; }
public Watcher(HMCon Connection, Form f) { this.Connection = Connection; this.ParentForm = f; this.Parent = ParentForm; InitializeComponent(); WatchThread = new Thread(new ThreadStart(StartTimer)); WatchThread.IsBackground = true; WatchTimer = new System.Timers.Timer(CONST_TICK_INTERVAL_FIVE_SECONDS); WatchTimer.Elapsed += new System.Timers.ElapsedEventHandler(WatchTimer_Elapsed); }
public Form1() { DevXMgr = new TUC_HMDevXManager.TUC_HMDevXManager(); DevXMgr.AppInit("adam"); Connection = new HMCon("web_strike_test", "dev11", 12, "adam"); //Connection = new HMConnection.HMCon("web_eric", @"dev-sql2014\dev2014", 12, "Eric"); //Connection = new HMConnection.HMCon("web_gc_test", @"dotnetsql\dotnetsql", 12, "DevGreg"); InitializeComponent(); sqlTRConnection.ConnectionString = Connection.TRConnection; ucMasterView_Loading(); dsSupplier1.Clear(); daSupplier.Fill(dsSupplier1); dsProject1.Clear(); daProject.Fill(dsProject1); }
public ucWFAPDetail(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(); SetupGLPicker(); SetupReferencePicker(); }
public ucDrawEvents(HMCon con, TUC_HMDevXManager.TUC_HMDevXManager hmDevMgr, WpfMapDrawBase map, MapEventLayer layer, int layerIndex) : base(con, hmDevMgr, map) { InitializeComponent(); _layerList = new Dictionary <MapEventLayer, int>() { { layer, layerIndex } }; cboType.Properties.Items.AddRange(_layerList.Keys); cboType.SelectedIndex = 0; gcAttr.DataSource = _attrTable; InDrawingStatus(false); }
public void Init(HMCon con, TUC_HMDevXManager.TUC_HMDevXManager hmDevMgr, List <DataRow> rowList, List <IMapLayer> layers) { _hmCon = con; _hmDevMgr = hmDevMgr; _layers = layers; _pop = new frmPopup(_hmDevMgr); foreach (var layer in _layers) { var page = tabControl.TabPages.Add(layer.LayerName); ucMapImport import = new ucMapImport(); import.Init(_hmCon, _hmDevMgr, rowList, layer); import.Parent = page; import.Dock = DockStyle.Fill; tabControl.TabPages.Add(page); } }
public Form1() { //Data Source=DEV-2005\DEV2000;Initial Catalog=hmreports;Persist Security Info=True;User ID=hmsqlsa;Password=hmsqlsa Connection = new HMCon("hmreports", @"DEV-2005\DEV2000", 12, "Adam"); //Connection = new HMCon("web_strike_test", "dev11", 12, "adam"); //Connection = new HMCon("web_resg_demo", "man1", 12, "adam"); // Connection = new HMCon("web_test", "dev12", 12, "ying"); InitializeComponent(); DevXMgr = new TUC_HMDevXManager.TUC_HMDevXManager(); DevXMgr.AppInit(Connection.MLUser); Admin = new Administration(Connection, DevXMgr); Admin.Parent = this; Admin.Dock = DockStyle.Fill; }
public frmQuickCheck(HMCon Connection, TUC_HMDevXManager.TUC_HMDevXManager DevXMgr, int AP_INV_HEADER_ID, int Year, int Period) { this.Connection = Connection; this.myMgr = DevXMgr; _AP_INV_HEADER_ID = AP_INV_HEADER_ID; _Year = Year; _Period = Period; InitializeComponent(); TR_Conn.ConnectionString = Connection.TRConnection; Popup = new frmPopup(myMgr); object obj = Connection.SQLExecutor.ExecuteScalar("select currency_id from AP_INV_HEADER where AP_INV_HEADER_ID =" + AP_INV_HEADER_ID, Connection.TRConnection); if (obj == null || obj == DBNull.Value) { obj = -1; } daBank.SelectCommand.Parameters["@currency_id"].Value = obj; daBank.Fill(dsBank1); deChkDate.DateTime = DateTime.Now.Date; ucAccountingPicker1.UserName = Connection.MLUser; ucAccountingPicker1.ConnectionString = Connection.TRConnection; chkIncludeHB.EditValue = "T"; CheckHBRouting(); string sSQL = @"if exists(select * from AP_INV_HEADER where isnull(INVOICE_TYPE,'I')='M' and AP_INV_HEADER_ID=" + _AP_INV_HEADER_ID + @") select 1 else select 0" ; b_Manual = Convert.ToBoolean(Connection.SQLExecutor.ExecuteScalar(sSQL, Connection.TRConnection)); if (b_Manual) { sSQL = @"select MANUAL_CHECK from AP_INV_HEADER where AP_INV_HEADER_ID=" + _AP_INV_HEADER_ID; txtCheckNo.Enabled = false; txtCheckNo.EditValue = Connection.SQLExecutor.ExecuteScalar(sSQL, Connection.TRConnection); btnPrint.Text = "Process"; } }