protected override void OnDisappearing() { base.OnDisappearing(); Label1.RemoveAllGestureRecognizers(); Label2.RemoveAllGestureRecognizers(); }
void ReleaseDesignerOutlets() { if (Caption != null) { Caption.Dispose(); Caption = null; } if (Label1 != null) { Label1.Dispose(); Label1 = null; } if (Image1 != null) { Image1.Dispose(); Image1 = null; } if (Image2 != null) { Image2.Dispose(); Image2 = null; } if (Label2 != null) { Label2.Dispose(); Label2 = null; } if (Image3 != null) { Image3.Dispose(); Image3 = null; } if (Label3 != null) { Label3.Dispose(); Label3 = null; } if (Image4 != null) { Image4.Dispose(); Image4 = null; } if (Label4 != null) { Label4.Dispose(); Label4 = null; } if (Number != null) { Number.Dispose(); Number = null; } if (IssueType != null) { IssueType.Dispose(); IssueType = null; } }
void FixGesturesUsingXaml() { Box.ProcessGestureRecognizers(); Label1.ProcessGestureRecognizers(); }
private void op_Done(object pTemplate) { object re = null; object thsh = null; object src = null; object er = null; object varnt = null; object blob_read = null; object rs = null; // ERROR: Not supported in C#: OnErrorStatement tp = pTemplate; DpSdkEngLib.FPTemplate rp = default(DpSdkEngLib.FPTemplate); op = new DPSDKOPSLib.FPGetTemplate(); vp = new DpSdkEngLib.FPVerify(); bool result = false; object strHex = null; string strTemp = null; short rno = 0; rno = 1; result = false; rs = modRecordSet.getRS(ref "SELECT * FROM PersonFPLnk WHERE PersonID = " + gID); //UPGRADE_WARNING: Couldn't resolve default property of object rs.RecordCount. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' if (rs.RecordCount > 0) { //Label3 = "You already have Finger Prints saved." //rs.Find "employee_name = '" + tName.Text + "'" //If rs.EOF = False Then //UPGRADE_WARNING: Couldn't resolve default property of object rs(). Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' //UPGRADE_WARNING: Couldn't resolve default property of object blob_read. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' blob_read = rs("Person_FP"); //UPGRADE_WARNING: Couldn't resolve default property of object blob_read. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' //UPGRADE_WARNING: Couldn't resolve default property of object varnt. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' varnt = blob_read; rp = new DpSdkEngLib.FPTemplate(); //UPGRADE_WARNING: Couldn't resolve default property of object er. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' er = rp.import(varnt); //UPGRADE_WARNING: Couldn't resolve default property of object re. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' re = vp.Compare(rp, pTemplate, result, src, thsh, false, DpSdkEngLib.AISecureModeMask.Sm_None); //UPGRADE_NOTE: Object rp may not be destroyed until it is garbage collected. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6E35BFF6-CD74-4B09-9689-3E1A43DF8969"' rp = null; //End If } else { } if (result == true) { Label1.Text = "Passed !!! Finger prints matched "; Label1.Refresh(); Interaction.MsgBox("Finger print matched."); //+ rs("employee_name") } else { Label1.Text = "Failed !!! Finger prints NOT matched"; Label1.Refresh(); Interaction.MsgBox("No finger print match found !"); } //UPGRADE_NOTE: Object rp may not be destroyed until it is garbage collected. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6E35BFF6-CD74-4B09-9689-3E1A43DF8969"' rp = null; //UPGRADE_NOTE: Object op may not be destroyed until it is garbage collected. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6E35BFF6-CD74-4B09-9689-3E1A43DF8969"' op = null; //UPGRADE_NOTE: Object vp may not be destroyed until it is garbage collected. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6E35BFF6-CD74-4B09-9689-3E1A43DF8969"' vp = null; return; FPA_Error: if (Err().Number == 429) { Interaction.MsgBox("Driver/Device missing for Finger Print Reader", MsgBoxStyle.Critical); } else { Interaction.MsgBox(Err().Number + " " + Err().Description, MsgBoxStyle.Critical); // ERROR: Not supported in C#: ResumeStatement } }
private void BuildGuiElements(String TableName) { // used to create GUIElements string GUIObjectName; dynamic GUIObject = null; // create all Forms, tabs and fields foreach (DataRow row in GlobalVar.DataSet.Tables[TableName].Rows) // Loop over the rows. { // compose GUIObjectName (field_[fieldID] ) GUIObjectName = TableName + "_" + row["id"].ToString(); // get Object to manage poolManager.GetObject(GUIObjectName, ref GUIObject); // check if objct need to be created if (null == GUIObject) { // create the object of correct class-type switch (TableName) { case "form": { GUIObject = new Form1(); break; } case "tab": { GUIObject = new TabPage(); break; } case "field": { switch (row["type"].ToString()) { case "Text": { GUIObject = new TextBox1(); break; } case "Button": { GUIObject = new Button1(); break; } case "Label": { GUIObject = new Label1(); break; } case "DataGridView": { GUIObject = new DataGridView1(); break; } default: { // column "type" has undefined Field Type break; } } break; } } // end switch // Add the new generated object to pool poolManager.AddObject(GUIObjectName, GUIObject); //MessageBox.Show(poolManager.CurrentObjectsInPool.ToString()); } //endif } // end loop }
public void PaintGui(int percent) { Label1.Text = percent.ToString() + "% completed"; Label1.Update(); }
void ReleaseDesignerOutlets() { if (Field0 != null) { Field0.Dispose(); Field0 = null; } if (Field1 != null) { Field1.Dispose(); Field1 = null; } if (Field2 != null) { Field2.Dispose(); Field2 = null; } if (Field3 != null) { Field3.Dispose(); Field3 = null; } if (Field4 != null) { Field4.Dispose(); Field4 = null; } if (Label0 != null) { Label0.Dispose(); Label0 = null; } if (Label1 != null) { Label1.Dispose(); Label1 = null; } if (Label2 != null) { Label2.Dispose(); Label2 = null; } if (Label3 != null) { Label3.Dispose(); Label3 = null; } if (Label4 != null) { Label4.Dispose(); Label4 = null; } }
public void GetRDLCContents() { #region Get RDLC Contents string _ReportPath = ""; string mimeType; string encoding; string fileNameExtension; string[] streams; DataSet _DataSetGetRdlCName = null; DataSet _DataSetRdlForMainReport = null; DataSet _DataSetRdlForSubReport = null; DataRow[] dr = null; DataRow[] _drSubReport = null; string _OrderingMethod = ""; string strErrorMessage = ""; LogManager objLogManager = null; ReportParameter[] _RptParam = null; //Ref to Task#2660 string FileName = ""; int seq = 1; reportViewer1 = new Microsoft.Reporting.WebForms.ReportViewer(); try { _ReportPath = Server.MapPath(".") + System.Configuration.ConfigurationManager.AppSettings["MedicationPerscriptionReportUrl"]; if (_ReportPath == "")//Check For Report Path { strErrorMessage = "ReportPath is Missing In WebConfig"; ScriptManager.RegisterStartupScript(Label1, Label1.GetType(), ClientID.ToString(), "ShowError('" + strErrorMessage + "', true);", true); return; } } catch (Exception ex) { Streamline.BaseLayer.LogManager.LogException(ex, LogManager.LoggingCategory.General, LogManager.LoggingLevel.Error, this); strErrorMessage = "ReportPath Key is Missing In WebConfig"; ScriptManager.RegisterStartupScript(Label1, Label1.GetType(), ClientID.ToString(), "ShowError('" + strErrorMessage + "', true);", true); return; } finally { objLogManager = null; } try { //Ref to Task#2660 if (System.Configuration.ConfigurationSettings.AppSettings["SaveJpegOutput"].ToLower() == "true") { if (System.IO.Directory.Exists(Server.MapPath("RDLC\\" + Context.User.Identity.Name))) { if (!System.IO.Directory.Exists(Server.MapPath("RDLC\\" + Context.User.Identity.Name + "\\JPEGS"))) { System.IO.Directory.CreateDirectory(Server.MapPath("RDLC\\" + Context.User.Identity.Name + "\\JPEGS")); } foreach (string file in Directory.GetFiles(Server.MapPath("RDLC\\" + Context.User.Identity.Name + "\\"))) { FileName = file.Substring(file.LastIndexOf("\\") + 1); if ((FileName.IndexOf("JPEG") >= 0 || FileName.IndexOf("jpeg") >= 0)) { //Added by Chandan on 16th Feb2010 ref task#2797 if (System.IO.File.Exists(Server.MapPath("RDLC\\" + Context.User.Identity.Name + "\\JPEGS") + "\\" + FileName)) { if (FileName.ToUpper().IndexOf(".RDLC") == -1) { System.IO.File.Delete(Server.MapPath("RDLC\\" + Context.User.Identity.Name + "\\" + FileName)); } } else { while (seq < 1000) { seq = seq + 1; if (!System.IO.File.Exists(Server.MapPath("RDLC\\" + Context.User.Identity.Name + "\\JPEGS") + "\\" + FileName)) { System.IO.File.Move(file, Server.MapPath("RDLC\\" + Context.User.Identity.Name + "\\JPEGS") + "\\" + FileName); break; } else { FileName = ApplicationCommonFunctions.GetFileName(FileName, seq); } } } } } } } else { #region DeleteOldRenderedImages try { using (Streamline.BaseLayer.RDLCPrint objRDLC = new RDLCPrint()) { objRDLC.DeleteRenderedImages(Server.MapPath("RDLC\\" + Context.User.Identity.Name)); } } catch (Exception ex) { Streamline.BaseLayer.LogManager.LogException(ex, LogManager.LoggingCategory.General, LogManager.LoggingLevel.Error, this); } #endregion } // _DataSetRdl = new DataSet();//Commented by Vikas Vyas On Dated March 04 2008 Streamline.UserBusinessServices.ClientMedication objectClientMedications = null; objectClientMedications = new ClientMedication(); //Added by Chandan for getting Location Id #region Added by Vikas Vyas _DataSetGetRdlCName = objectClientMedications.GetRdlCNameDataBase(1028); _DataSetGetRdlCName.Tables[0].TableName = "DocumentCodes"; _DataSetGetRdlCName.Tables[1].TableName = "DocumentCodesRDLSubReports"; if (_DataSetGetRdlCName.Tables["DocumentCodes"].Rows.Count > 0) { dr = _DataSetGetRdlCName.Tables["DocumentCodes"].Select();//because DocumentCodes table only contain one row //Check For Main Report if ((dr[0]["DocumentName"] != DBNull.Value || !String.IsNullOrEmpty(dr[0]["DocumentName"].ToString())) && (dr[0]["ViewStoredProcedure"] != DBNull.Value || !String.IsNullOrEmpty(dr[0]["ViewStoredProcedure"].ToString()))) { #region Get the StoredProceudreName and Execute string _StoredProcedureName = ""; string _ReportName = ""; _StoredProcedureName = dr[0]["ViewStoredProcedure"].ToString();//Get the StoredProcedure Name _ReportName = dr[0]["DocumentName"].ToString(); this.reportViewer1.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Local; this.reportViewer1.LocalReport.ReportPath = _ReportPath + "\\" + _ReportName + ".rdlc"; this.reportViewer1.LocalReport.DataSources.Clear(); //Get Data For Main Report //One More Parameter Added by Chandan Task#85 MM1.7 _DataSetRdlForMainReport = objectClientMedications.GetDataForPrescriberRdlC(_StoredProcedureName, ((Streamline.BaseLayer.StreamlineIdentity)Context.User.Identity).UserId, LabelReviewDateTime.Text, HiddenFieldRDLCurrentDateTime.Value); //Microsoft.Reporting.WebForms.ReportDataSource DataSource = new ReportDataSource("RdlReportDataSet_" + _StoredProcedureName, _DataSetRdlForMainReport.Tables[0]); Microsoft.Reporting.WebForms.ReportDataSource DataSource = new Microsoft.Reporting.WebForms.ReportDataSource("RDLReportDataSet_" + _StoredProcedureName, _DataSetRdlForMainReport.Tables[0]); //Added by Chandan 0n 18th Dec 2008 //Session["DataSetRdlTemp"] = null; DataSet dstemp = (DataSet)Session["DataSetRdlTemp"]; if (dstemp == null) { dstemp = _DataSetRdlForMainReport; } else { dstemp.Merge(_DataSetRdlForMainReport); } Session["DataSetRdlTemp"] = dstemp; //HiddenFieldStoredProcedureName.Value = _StoredProcedureName; //HiddenFieldReportName.Value = _ReportName; #endregion //Code addded by Loveena in ref to Task#2597 //Following parameters added with ref to Task 2371 SC-Support _RptParam = new ReportParameter[3]; _RptParam[0] = new ReportParameter("PrescriberId", ((Streamline.BaseLayer.StreamlineIdentity)Context.User.Identity).UserId.ToString()); _RptParam[1] = new ReportParameter("LastReviewTime", LabelReviewDateTime.Text); _RptParam[2] = new ReportParameter("ServerTime", HiddenFieldRDLCurrentDateTime.Value); reportViewer1.LocalReport.SetParameters(_RptParam); reportViewer1.LocalReport.Refresh(); reportViewer1.LocalReport.DataSources.Add(DataSource); } } #endregion //Added by Rohit. Ref ticket#84 string reportType = "PDF"; IList <Stream> m_streams; m_streams = new List <Stream>(); Microsoft.Reporting.WebForms.Warning[] warnings; string deviceInfo = "<DeviceInfo><OutputFormat>PDF</OutputFormat><StartPage>0</StartPage></DeviceInfo>"; if (Session["imgId"] == null) { Session["imgId"] = 0; } else { Session["imgId"] = Convert.ToInt32(Session["imgId"]) + 1; } string ScriptId = Session["imgId"] + "_" + DateTime.Now.ToString("yyyyMMHHMMss") + "." + seq.ToString(); try { using (Streamline.BaseLayer.RDLCPrint objRDLC = new RDLCPrint()) { //In case of Ordering method as X Chart copy will be printed objRDLC.RunPreview(this.reportViewer1.LocalReport, Server.MapPath("RDLC\\" + Context.User.Identity.Name), ScriptId, false, false); //Added by Rohit. Ref ticket#84 renderedBytes = reportViewer1.LocalReport.Render(reportType, deviceInfo, out mimeType, out encoding, out fileNameExtension, out streams, out warnings); ShowReport(ScriptId); } } catch (Exception ex) { Streamline.BaseLayer.LogManager.LogException(ex, LogManager.LoggingCategory.General, LogManager.LoggingLevel.Error, this); } finally { objLogManager = null; } } catch (Exception ex) { Streamline.BaseLayer.LogManager.LogException(ex, LogManager.LoggingCategory.General, LogManager.LoggingLevel.Error, this); } finally { // //Added by Vikas Vyas In ref to task 2334 On Dated March 04th 2008 _DataSetGetRdlCName = null; _DataSetRdlForMainReport = null; _DataSetRdlForSubReport = null; _RptParam = null; ////End } #endregion }
protected void Button1_Click(object sender, EventArgs e) { Boolean cadastrado = false; string protocolo = TextBox1.Text; string data = DateTime.Now.Day + "/" + DateTime.Now.Month + "/" + DateTime.Now.Year; if (TextBox1.Text == "") { Response.Write("<script>alert('Favor digitar alguma protocolo');</script>"); } else { if (verdigitoano(protocolo)) { ConexaoDb gerenciadb = new ConexaoDb(); SqlConnection conexaosql = gerenciadb.getConexao(); SqlCommand comandosql = gerenciadb.getComando(conexaosql); comandosql.CommandType = System.Data.CommandType.Text; comandosql.CommandText = "SELECT PROTOCOLO FROM PROTOCOLOHAIA WHERE @PROTOCOLO = PROTOCOLO"; comandosql.Parameters.Add("@PROTOCOLO", protocolo + "/" + DateTime.Now.Year); SqlDataReader reader = gerenciadb.getReader(comandosql); while (reader.Read()) { protocolo = protocolo + "/" + DateTime.Now.Year; if (protocolo.Equals(reader.GetString(0))) { Response.Write("<script>alert('Protocolo já cadastrado');</script>"); cadastrado = true; break; } } if (cadastrado == false) { Boolean sedex = false; int simsedex = 0; if (CheckBox1.Checked) { sedex = true; simsedex = 1; } reader.Close(); comandosql.Parameters.Clear(); comandosql.CommandText = "INSERT INTO PROTOCOLOHAIA (PROTOCOLO,DATALIBERACAO,sedex)VALUES(@PROTOCOLO,@DATALIBERACAO,@sedex)"; comandosql.Parameters.Add("@PROTOCOLO", protocolo + "/" + DateTime.Now.Year); comandosql.Parameters.Add("@DATALIBERACAO", data); comandosql.Parameters.Add("@sedex", simsedex); comandosql.ExecuteNonQuery(); TextBox1.Text = ""; Label1.Focus(); GridView1.DataBind(); } } } }
private void frm_inicio_Load(object sender, EventArgs e) { // metodo pone un timer a funcionar para ir mostrado la hora en el sistema y se cambie timer1.Start(); // antes de iniciar el programa implementa parametros para acomodar la interfaz dependiendo de la pantalla de computador PictureBox1.SetBounds(Screen.PrimaryScreen.Bounds.Width - 150, 15, PictureBox1.Width, PictureBox1.Height); PictureBox2.SetBounds(0, Screen.PrimaryScreen.Bounds.Height - 70, PictureBox2.Width, PictureBox2.Height); PictureBox3.SetBounds(Screen.PrimaryScreen.Bounds.Width - 60, 15, PictureBox3.Width, PictureBox3.Height); PictureBox4.SetBounds(10, 30, PictureBox4.Width, PictureBox4.Height); PictureBox5.SetBounds(this.Width - 200, this.Height - 100, PictureBox5.Width, PictureBox5.Height); Label1.SetBounds(100, 30, Label1.Width, Label1.Height); nombre.SetBounds(Screen.PrimaryScreen.Bounds.Width - 290, PictureBox1.Height - 40, nombre.Width, nombre.Height); Label3.SetBounds(Screen.PrimaryScreen.Bounds.Width - 290, PictureBox1.Height - 15, Label3.Width, Label3.Height); Label11.SetBounds(this.Width - 245, this.Height - 120, Label11.Width, Label11.Height); Label12.SetBounds(Screen.PrimaryScreen.Bounds.Width - 60, PictureBox3.Height + 15, Label12.Width, Label12.Height); Label4.SetBounds(Screen.PrimaryScreen.Bounds.Width - 220, PictureBox1.Height, Label4.Width, Label4.Height); pn_principal.SetBounds(PictureBox4.Width + 50, PictureBox4.Height + 40, Panel1.Width + pn_empleados.Width + Pn_pagos.Width + 400, Panel4.Height + Panel1.Height + 100); Panel1.SetBounds(PictureBox4.Width + 50, PictureBox4.Height + 40, Panel1.Width, Panel1.Height); pn_empleados.SetBounds(Panel1.Width + 350, PictureBox4.Height + 40, pn_empleados.Width, pn_empleados.Height); Pn_pagos.SetBounds(pn_empleados.Width + 800, PictureBox4.Height + 40, Pn_pagos.Width, Pn_pagos.Height); Panel4.SetBounds(PictureBox4.Width + 50, Panel1.Height + 200, Panel4.Width, Panel4.Height); Panel5.SetBounds(Panel4.Width + 350, Panel1.Height + 200, Panel5.Width, Panel5.Height); pn_configuracion.SetBounds(Panel5.Width + 800, Panel1.Height + 200, Panel5.Width, Panel5.Height); pn_principal.Hide(); // obtiene los datos del usuario actual por medio de la variable ID DataSet ds = conexion.sqlconsulta("Select nombre,puesto,cedula,foto from tbl_usuarios where id_usuario='" + ID.ToString() + "'"); nombre.Text = ds.Tables[0].Rows[0].ItemArray[0].ToString(); Label3.Text = ds.Tables[0].Rows[0].ItemArray[1].ToString(); try { PictureBox1.BackgroundImage = Image.FromFile(ds.Tables[0].Rows[0].ItemArray[3].ToString()); PictureBox1.BackgroundImageLayout = ImageLayout.Stretch; } catch (Exception ex) { PictureBox1.BackgroundImage = Image.FromFile(@"perfiles\profile.png"); PictureBox1.BackgroundImageLayout = ImageLayout.Stretch; } var busqueda = new StreamReader("configuracion.cfg"); String cadena; while ((cadena = busqueda.ReadLine()) != null) { string[] campos = cadena.Split(':'); if (campos[0].Equals("Fondo")) { this.BackgroundImage = Image.FromFile("fondo/" + campos[1]); this.BackgroundImageLayout = ImageLayout.Stretch; } cadena = busqueda.ReadLine(); } busqueda.Close(); }