public static string FindExisitingLoca(string locacode) { string str = ""; if (M_LocaDL.ExistingM_Loca(locacode.Trim())) { M_Loca cat = new M_Loca(); cat.Locacode = locacode.Trim(); M_LocaDL dl = new M_LocaDL(); cat = dl.Selectm_Loca(cat); str = cat.Locaname; } else { str = "<Error!!!>"; } return(str); }
private void frmU_Login_Load(object sender, EventArgs e) { //txtPassword.Text = ""; //txtUserId.Text = ""; try { DataTable dt = new M_LocaDL().SelectAllm_Loca(); if (dt.Rows.Count > 0) { foreach (DataRow drow in dt.Rows) { cmb_loca.Items.Add(drow[0].ToString() + " - " + drow[1].ToString()); } cmb_loca.SelectedIndex = 0; } else { } } catch (Exception ex) { } }