Esempio n. 1
0
        public static string GetUniqueDatabaseId()
        {
            string      str         = "Select AccP_Database From AccPacConfig where AccP_Deleted is NULL";
            QuerySelect querySelect = new QuerySelect();

            querySelect.SQLCommand = str;
            querySelect.ExecuteReader();
            string str1 = "";
            int    num  = 0;

            while (!querySelect.Eof())
            {
                num++;
                str1 = querySelect.FieldValue("AccP_database");
                if (num > 1)
                {
                    break;
                }
                querySelect.Next();
            }
            if (num != 1)
            {
                return("");
            }
            return(str1);
        }
Esempio n. 2
0
        public static string BuildDatabaseDropDwon(bool bSynchronized)
        {
            string      str         = "<SELECT CLASS=EDIT SIZE=1 ID='dropdownDatabaseId' NAME='database' style='width:200px; height:25px'>";
            string      str1        = " Select * From AccPacConfig where AccP_Deleted is NULL order by AccP_database";
            QuerySelect querySelect = new QuerySelect();

            querySelect.SQLCommand = str1;
            querySelect.ExecuteReader();
            while (!querySelect.Eof())
            {
                string str2 = (querySelect.FieldValue("accp_default") == "Y" ? " SELECTED" : "");
                string str3 = querySelect.FieldValue("accp_description");
                string str4 = querySelect.FieldValue("AccP_database");
                string str5 = "<OPTION VALUE='{0}'{1}>{2}</OPTION>";
                str = string.Concat(str, string.Format(str5, str4, str2, str3));
                querySelect.Next();
            }
            str = string.Concat(str, "</SELECT></br>");
            return(str);
        }
Esempio n. 3
0
        public static string GetOpportunityTabInfo(string logonUser, string companyDb, string compId, string emailSubject)
        {
            string configField = CommonPage.GetConfigField("AccP_CompEmail", companyDb);

            CommonPage.GetConfigField("AccP_ServerName", companyDb);
            string      str         = "";
            string      str1        = string.Concat("Select emai_emailaddress as email from Email e inner join EmailLink el on e.Emai_EmailId = el.ELink_EmailId where el.ELink_EntityId = 5 and el.ELink_RecordID = ", Convert.ToInt32(compId));
            QuerySelect querySelect = new QuerySelect();

            querySelect.SQLCommand = str1;
            querySelect.ExecuteReader();
            if (!querySelect.Eof())
            {
                str = querySelect.FieldValue("email");
            }
            string      str2         = string.Concat("Select Oppo_OpportunityId, Oppo_Description, Oppo_PrimaryCompanyId, Oppo_PrimaryPersonId From Opportunity where Oppo_Status = 'In Progress' and Oppo_PrimaryCompanyId = ", Convert.ToInt32(compId));
            string      str3         = string.Format("{0}|{1}|{2}|{3}&", new object[] { logonUser, str, configField, emailSubject });
            QuerySelect querySelect1 = new QuerySelect();

            querySelect1.SQLCommand = str2;
            querySelect1.ExecuteReader();
            while (!querySelect1.Eof())
            {
                string str4 = querySelect1.FieldValue("Oppo_OpportunityId");
                string str5 = querySelect1.FieldValue("Oppo_Description");
                string str6 = querySelect1.FieldValue("Oppo_PrimaryCompanyId");
                string str7 = querySelect1.FieldValue("Oppo_PrimaryPersonId");
                if (string.IsNullOrEmpty(str7))
                {
                    str7 = "0";
                }
                string str8 = string.Format("{0},{1},{2},{3}", new object[] { str4, str5, str6, str7 });
                str3 = string.Concat(str3, str8, "|");
                querySelect1.Next();
            }
            str3 = str3.Substring(0, str3.Length - 1);
            return(string.Format("<input id='txtOpportunityID' name='txtOpportunityID' type='hidden' value='{0}'>", str3));
        }