public string AllValid(Menum Record) { string str = ""; try { sql = "select menu_pkid from ("; sql += "select menu_pkid from menum a where rec_company_code ='" + Record._globalvariables.comp_code + "' "; sql += " and (a.menu_code = '{CODE}' or a.menu_name = '{NAME}') "; sql += ") a where menu_pkid <> '{PKID}'"; sql = sql.Replace("{CODE}", Record.menu_code); sql = sql.Replace("{NAME}", Record.menu_name); sql = sql.Replace("{PKID}", Record.menu_pkid); if (Con_Oracle.IsRowExists(sql)) { str = "Code/Name Exists"; } } catch (Exception Ex) { str = Ex.Message.ToString(); } return(str); }
public string AllValid(Campaign Record) { string str = ""; try { sql = "select cam_pkid from ("; sql += "select cam_pkid from campaign a where rec_company_code ='" + Record._globalvariables.comp_code + "' "; sql += " and (a.cam_name = '{NAME}') "; sql += ") a where cam_pkid <> '{PKID}'"; sql = sql.Replace("{NAME}", Record.cam_name); sql = sql.Replace("{PKID}", Record.cam_pkid); if (Con_Oracle.IsRowExists(sql)) { str = "Name Exists"; } string tname = Lib.getSettings(Record._globalvariables.comp_code, "IMAGE-TABLE", "NAME"); if (tname != Record.cam_tab_name) { sql = "select cam_pkid from ("; sql += "select cam_pkid from campaign a where rec_company_code ='" + Record._globalvariables.comp_code + "' "; sql += " and (a.cam_tab_id = '{ID}') "; sql += ") a where cam_pkid <> '{PKID}'"; sql = sql.Replace("{ID}", Record.cam_tab_id); sql = sql.Replace("{PKID}", Record.cam_pkid); if (Con_Oracle.IsRowExists(sql)) { str = "Name Exists"; } } } catch (Exception Ex) { str = Ex.Message.ToString(); } return(str); }
public string AllValid(pim_docm Record, DataRow HeaderRow) { string str = ""; try { if (HeaderRow["tab_sku"].ToString() != "" && HeaderRow["tab_sku_duplication"].ToString() == "N") { sql = "select doc_pkid from ("; sql += " select doc_pkid from pim_docm a "; sql += " where doc_name = '" + Record.doc_name + "' "; sql += " and doc_table_name = '" + Record.doc_table_name + "' "; sql += " ) a where doc_pkid <> '" + Record.doc_pkid + "'"; if (Con_Oracle.IsRowExists(sql)) { str = HeaderRow["tab_sku"].ToString() + " Exists"; } } else if (HeaderRow["tab_store"].ToString() != "" && HeaderRow["tab_store_duplication"].ToString() == "N") { sql = "select doc_pkid from ("; sql += " select doc_pkid from pim_docm a "; sql += " where doc_store_id = '" + Record.doc_store_id + "' "; sql += " and doc_table_name = '" + Record.doc_table_name + "' "; sql += " ) a where doc_pkid <> '" + Record.doc_pkid + "'"; if (Con_Oracle.IsRowExists(sql)) { str = HeaderRow["tab_store"].ToString() + " Exists"; } } } catch (Exception Ex) { str = Ex.Message.ToString(); } return(str); }
public string AllValid(pim_groupm Record) { string str = ""; try { sql = "select comp_pkid from ("; sql += "select comp_pkid from companym a where (a.comp_code = '{CODE}') "; sql += ") a where comp_pkid <> '{PKID}'"; //sql = sql.Replace("{CODE}", Record.comp_code); if (Con_Oracle.IsRowExists(sql)) { str = "Code/Name Exists"; } } catch (Exception Ex) { str = Ex.Message.ToString(); } return(str); }
public string AllValid2(tablesd Record) { string str = ""; try { sql = "select tabd_pkid from ("; sql += " select tabd_pkid from tablesd a "; sql += " where tabd_parent_id = '" + Record.tabd_parent_id + "' and tabd_col_name = '" + Record.tabd_col_name + "' "; sql += ") a where tabd_pkid <> '" + Record.tabd_pkid + "'"; //sql = sql.Replace("{CODE}", Record.comp_code); if (Con_Oracle.IsRowExists(sql)) { str = "Table Name Exists"; } } catch (Exception Ex) { str = Ex.Message.ToString(); } return(str); }
public string AllValid(tablesm Record) { string str = ""; try { sql = "select tab_pkid from ("; sql += " select tab_pkid from tablesm a "; sql += " where rec_company_Code = '" + Record._globalvariables.comp_code + "' and tab_name = '" + Record.tab_name + "' "; sql += ") a where tab_pkid <> '" + Record.tab_pkid + "'"; //sql = sql.Replace("{CODE}", Record.comp_code); if (Con_Oracle.IsRowExists(sql)) { str = "Table Name Exists"; } } catch (Exception Ex) { str = Ex.Message.ToString(); } return(str); }