Click here to Skip to main content
15,891,253 members
Home / Discussions / C#
   

C#

 
AnswerRe: Formatting a number and digits of precision Pin
OriginalGriff6-Nov-18 21:01
mveOriginalGriff6-Nov-18 21:01 
GeneralRe: Formatting a number and digits of precision Pin
csharpsucks7-Nov-18 4:32
csharpsucks7-Nov-18 4:32 
GeneralRe: Formatting a number and digits of precision Pin
Richard Deeming7-Nov-18 4:38
mveRichard Deeming7-Nov-18 4:38 
GeneralRe: Formatting a number and digits of precision Pin
OriginalGriff7-Nov-18 4:44
mveOriginalGriff7-Nov-18 4:44 
GeneralRe: Formatting a number and digits of precision Pin
csharpsucks7-Nov-18 6:08
csharpsucks7-Nov-18 6:08 
GeneralRe: Formatting a number and digits of precision Pin
OriginalGriff7-Nov-18 6:28
mveOriginalGriff7-Nov-18 6:28 
GeneralRe: Formatting a number and digits of precision Pin
csharpsucks7-Nov-18 6:44
csharpsucks7-Nov-18 6:44 
QuestionProblem at inserting a DB entry Pin
User 136751145-Nov-18 23:49
User 136751145-Nov-18 23:49 
Hi Guys,

Below code don't allow to create entry at database with null areas and pop-up comes to warn user.

I fill all fields/create entry and all fields are cleared up for new entry but once I try to add new entry, program allows me to create with empty fields.

Do I need to add some code in order form to reload or something like that?

What would be the way of getting rid of this issue?

Thanks.

note: something other than Application.Restart(). that would be great if no close&open app.

private void btnStokEkle_Click_1(object sender, EventArgs e)
        {
            if (txtAdi.Text == "" || txtModel.Text == "" || txtSeriNo.Text == "" || gon.Text == "" || tah.Text == "")
            {
                MessageBox.Show("Lütfen Tüm Alanları Doldurunuz.", "Hata", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            else

            vt.sqlCalistir("insert into kolon (siparis,malzeme,takip,gonder,tahmini,gercek) values ('" + txtAdi.Text + "','" + txtModel.Text + "','" + txtSeriNo.Text + "','" + gon.Text + "','" + tah.Text + "', '" + tt.Text + "')");
            MessageBox.Show("İşlem Kaydı Yapıldı.", "İşlem Tamam", MessageBoxButtons.OK, MessageBoxIcon.Information);

            getir();
            txtId.Clear();
            txtAdi.Clear();
            txtModel.Clear();
            txtSeriNo.Clear();
            gon.EditValue = " ";
            tah.EditValue = " ";
            tt.EditValue = " ";
            txtSeriNo.Text = Environment.UserName;

        }


modified 13-Feb-19 21:02pm.

AnswerRe: Problem at inserting a DB entry Pin
OriginalGriff6-Nov-18 0:08
mveOriginalGriff6-Nov-18 0:08 
GeneralRe: Problem at inserting a DB entry Pin
User 136751146-Nov-18 3:12
User 136751146-Nov-18 3:12 
GeneralRe: Problem at inserting a DB entry Pin
Luc Pattyn6-Nov-18 3:51
sitebuilderLuc Pattyn6-Nov-18 3:51 
AnswerRe: Problem at inserting a DB entry Pin
tranthanhtu.vn6-Nov-18 18:12
professionaltranthanhtu.vn6-Nov-18 18:12 
RantRe: Problem at inserting a DB entry Pin
Richard Deeming7-Nov-18 0:59
mveRichard Deeming7-Nov-18 0:59 
AnswerRe: Problem at inserting a DB entry Pin
tranthanhtu.vn7-Nov-18 1:27
professionaltranthanhtu.vn7-Nov-18 1:27 
RantRe: Problem at inserting a DB entry Pin
Richard Deeming7-Nov-18 1:32
mveRichard Deeming7-Nov-18 1:32 
AnswerRe: Problem at inserting a DB entry Pin
tranthanhtu.vn7-Nov-18 1:36
professionaltranthanhtu.vn7-Nov-18 1:36 
GeneralRe: Problem at inserting a DB entry Pin
Eddy Vluggen7-Nov-18 1:44
professionalEddy Vluggen7-Nov-18 1:44 
AnswerRe: Problem at inserting a DB entry Pin
tranthanhtu.vn7-Nov-18 2:29
professionaltranthanhtu.vn7-Nov-18 2:29 
GeneralRe: Problem at inserting a DB entry Pin
Eddy Vluggen7-Nov-18 2:37
professionalEddy Vluggen7-Nov-18 2:37 
AnswerRe: Problem at inserting a DB entry Pin
tranthanhtu.vn7-Nov-18 2:42
professionaltranthanhtu.vn7-Nov-18 2:42 
QuestionCorrelation of several multi-track charts in C# Pin
Member 133258465-Nov-18 19:13
Member 133258465-Nov-18 19:13 
Question[solved] GuidAttribute Pin
Super Lloyd5-Nov-18 2:29
Super Lloyd5-Nov-18 2:29 
QuestionCreating & writing to a text file from two different forms Pin
Member 140427683-Nov-18 9:45
Member 140427683-Nov-18 9:45 
AnswerRe: Creating & writing to a text file from two different forms Pin
Dave Kreskowiak3-Nov-18 10:06
mveDave Kreskowiak3-Nov-18 10:06 
GeneralRe: Creating & writing to a text file from two different forms Pin
Member 140427684-Nov-18 4:03
Member 140427684-Nov-18 4:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.