|
And it's not even picked up some of the obvious things!
var customer = ctx.Customers.FirstOrDefault(c => c.HasOrders);
...
var postage = ctx.Postage.Where(p => P.Country == customer.Country);
...
var valuePlusPostage = value += postage;
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
"Browse ith record in the GridView if error rerun faulty records" this is my request, using a while loop 2, while outer ring running again if the ith sample error message, the sample code below if An error occured not run very well, but there are problems caused ith GridView on jump number and apparently does not run again faulty records, when defective block catch (Exception ex) is run, it gets in the error message in the block catch (Exception ex) and i will run continuously variable for every row (or rows) of the GridView, thanks to the help you troubleshoot.
private void Tinh(object sender)
{
DevExpress.XtraGrid.Views.Grid.GridView Gv = (GridView)sender;
<pre>
i = 0;
while (i < Gv.RowCount && bStop)
{
try
{
// While i have not stopped yet, the East and the next run
while (i < Gv.RowCount && bStop)// Running the main loop
{
if (condition)
{
//do somthing
}
else
{
//do somthing
}
i++;
} // Running the main loop
}
catch (Exception ex)
{
i++;
Debug.Print("error: " + ex.Message);
}
}// Repeat loop faulty next record
}
modified 20-Aug-16 4:21am.
|
|
|
|
|
Sorry, but I didn't get any idea of what your problem is from that, or any clue as to what help you need.
Remember, we have no access to your data, so we can't run your code under the same circumstances you do to spot problems.
What does the debugger say is happening when it does something you didn't expect, or doesn't do something you did? What did you do, what data is it working from to cause the problem?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
I have formatted your code correctly but I am afraid it still makes no sense. Why do you repeat the same while loop inside the outer one?
|
|
|
|
|
because when browsing to records ith if an error message will jump to the next record, if there are errors it will run the loop outside. if no errors it will run the loop in. it did not escape the function catch (Exception ex) when faulty, endless loop.
|
|
|
|
|
HI to all ^^
May I ask if there is a right code for reading a response of port from declaring a command to send via AT commands, which the commands is AT+CREG and read the reponse of this command (AT+CREG)
please help
and thank you very much
|
|
|
|
|
What have you tried?
Where are you stuck?
What help do you need?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
As of now, I use a C#.net platform in a GSMComm library format but GSMComm has no method in how to fetch the format for AT+CREG and still i'm still searching to gain more ideas to achieve the pattern and i've stuck about parsing to read the response of AT commands as an output using AT+CREG that possibly result in a format
AT+CREG?
+CREG: 2,1,"02D0","CB9B"
and I need your help to guide me in how to achieve at least this format
any type of methods and properties of C#
thank you very much
|
|
|
|
|
just like to know can we draw uml diagram from visual studio 2013 community edition ?
it is by default not there. so i install Microsoft Visual Studio 2013 SDK - ENU and Microsoft Visual Studio 2013 Visualization and Modeling SDK but still Architecture menu is not coming in my VS2013 community edition IDE.
does it mean that people who use VS 2013 community edition they will not get this features ?
please drive me to right direction. thanks
tbhattacharjee
|
|
|
|
|
|
UML is a part of Ultimate.
Sometimes I wish I could justify that particular expense.
"There are three kinds of lies: lies, damned lies and statistics."
- Benjamin Disraeli
|
|
|
|
|
If you just want UML, then use Visio Pro; with Standard (or the "Student") you can usually find free templates on the web for UML.
Visio "Architect" is what you're otherwise referring to; i.e. generate software out of Visio / reverse engineer.
|
|
|
|
|
I have a requirement of reading the current directory opened in foreground Windows Explorer.
I am checking whether windows explorer is in foreground or not from this.
how to do this ? please help me.
|
|
|
|
|
|
I need the lines of code to help me link text to pre-recorded sounds.
|
|
|
|
|
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind.
All we get to work with is exactly what you type: we get no context beyond that...
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Well, you could convert the "sounds" to text; or the text to "sounds"; and compare them...
What would you like?
|
|
|
|
|
What do you want to achieve? What's the input, and what should be the result?
Do you have some text and some sound file corresponding to that text, and now you want to create an application which shows the text, plays the sound, and highlights the position in the text? Or plays the sound corresponding to some selected part of the text? Or ...?
|
|
|
|
|
I have a requirement of enabling drag option for border less form within a fixed location of screen.
I am reading the windows explorer’s position for this method. Then I will place an icon within window’s explorer window and planning to allow dragging of that form everywhere inside the windows explorer.
How to do this ?
|
|
|
|
|
I'm not clear on what you describe here.
You find the current position of Win Explorer ... what if there are multiple folder views open ?
You move an icon within a Win Explorer window ... how do you keep it on top ?
What is the borderless Form you refer to ... what is its relationship to the icon, or the Win Explorer window ?
Making a Windows Form draggable is easy; how do you want the user to start dragging it ... by click-dragging anywhere on the Form not covered by a Control ? by clicking on some visual indicator ? by clicking on a certain region in the Form ?
«There is a spectrum, from "clearly desirable behaviour," to "possibly dodgy behavior that still makes some sense," to "clearly undesirable behavior." We try to make the latter into warnings or, better, errors. But stuff that is in the middle category you don’t want to restrict unless there is a clear way to work around it.» Eric Lippert, May 14, 2008
|
|
|
|
|
BillWoodruff wrote: You find the current position of Win Explorer ... what if there are multiple folder views open ?
You move an icon within a Win Explorer window ... how do you keep it on top ? I manage multiple windows with the handle of the window. See my previous question.
I am keeping the form on top of explorer by setting "me.topmost" property.
I want to allow dragging of form on mouse left click down everywhere inside the form but that form should be draggable within specified location of window (i.e within windows explorer window)
|
|
|
|
|
You still have not clearly explained what the use of the Icon and the Form isQuote: I want to allow dragging of form on mouse left click down everywhere inside the form but that form should be draggable within specified location of window (i.e within windows explorer window) This statement implies you have two Forms, and that one is dragged within the bounds of the other.
Please try and describe clearly what you are trying to achieve, and, why are you trying to change the appearance of what the user sees in an Explorer Window ? Describe exactly what your app creates.
The use of "me.topmost" suggests this is a VB Project ... is that correct ?
«There is a spectrum, from "clearly desirable behaviour," to "possibly dodgy behavior that still makes some sense," to "clearly undesirable behavior." We try to make the latter into warnings or, better, errors. But stuff that is in the middle category you don’t want to restrict unless there is a clear way to work around it.» Eric Lippert, May 14, 2008
|
|
|
|
|
Hi
I have windows form.in that
I have table tbluseraction
actionid actionname
-------------------------
1 read
2 write
3 delete
I have another table tbluserform
formid formname
---------------------------------
1 frmbackup
2 frmrestore
Now i want to give premission to each form.I have check box for every permission
after giving rights it is saved in table as
formid actionid
1 1
1 2
2 1
I have given source code and Please help me
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace DERPS
{
public partial class frmERPRights : Form
{
int ModuleCode;
int UserCode;
DataTable dtColumns;
public frmERPRights()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
dgvERPPermission.Columns.Add("clmFormCode", "Form Code");//0
dgvERPPermission.Columns.Add("clmFormDescription", "Form Description");//1
using (SqlConnection CNN = new SqlConnection(AppManager.GetConnectionString()))
{
CNN.Open();
using (SqlCommand scmd = new SqlCommand()) {
scmd.CommandText = "select ActionCode, ActionName from erpactions where isPermissible=1";
scmd.Connection = CNN;
SqlDataAdapter sda = new SqlDataAdapter(scmd);
dtColumns = new DataTable();
dgvERPPermission.AutoGenerateColumns = false;
sda.Fill(dtColumns);
foreach (DataRow row in dtColumns.Rows)
{
DataGridViewCheckBoxColumn checkColumn = new DataGridViewCheckBoxColumn();
checkColumn.Name = row[0].ToString();
checkColumn.HeaderText = row[1].ToString();
checkColumn.Width = 50;
checkColumn.ReadOnly = false;
checkColumn.FillWeight = 10; //if the datagridview is resized (on form resize) the checkbox won't take up too much; value is relative to the other columns' fill values
dgvERPPermission.Columns.Add(checkColumn);
}
}
}
using (SqlConnection CNN = new SqlConnection(AppManager.GetConnectionString()))
{
CNN.Open();
using (SqlCommand scmd = new SqlCommand())
{
scmd.CommandText = "select FormCode,FormDescription from ERPFORMS";
scmd.Connection = CNN;
SqlDataAdapter sda = new SqlDataAdapter(scmd);
DataTable dt = new DataTable();
dgvERPPermission.AutoGenerateColumns = false;
sda.Fill(dt);
object[] row1;
foreach (DataRow row in dt.Rows)
{
row1 = new object[] { row[0], row[1] };
dgvERPPermission.Rows.Add(row1);
}
}
}
}
private void tsbSave_Click(object sender, EventArgs e) //to be saved
{
try
{
using (SqlConnection CNN = new SqlConnection(AppManager.GetConnectionString()))
{
CNN.Open();
foreach (DataGridViewRow row in dgvERPPermission.Rows)
{
foreach (DataGridViewCell cell in row.Cells)
{
string value = cell.Value.ToString();
if (cell.Value.ToString() == "true")
{
MessageBox.Show(value);
}
}
}
}
}
catch (Exception ex)
{
}
}
}
}
Thanks
chandran
|
|
|
|
|
Sorry, could you explain better where is the problem?
From your statement, it seems that you are just posting a working code.
|
|
|
|
|
That sounds the wrong way to do it. You would normally declare a set of allowable functions in your form/database etc. You then assign permissions to users, based on their job, and when the user logs onto the system, you can check what functions they are allowed to perform.
|
|
|
|