Click here to Skip to main content
15,926,507 members
Home / Discussions / Web Development
   

Web Development

 
QuestionInstant messaging using jsp,servlets Pin
Member 37065538-Jan-07 19:39
Member 37065538-Jan-07 19:39 
QuestionMicrosoft CRM client side integration Pin
Pompie8-Jan-07 16:45
Pompie8-Jan-07 16:45 
QuestionCan I build an UI using .Net framework Pin
indian1437-Jan-07 20:31
indian1437-Jan-07 20:31 
AnswerRe: Can I build an UI using .Net framework Pin
Christian Graus8-Jan-07 15:57
protectorChristian Graus8-Jan-07 15:57 
GeneralRe: Can I build an UI using .Net framework Pin
indian1438-Jan-07 18:26
indian1438-Jan-07 18:26 
QuestionWeird Issue in "if" statement Pin
Programm3r7-Jan-07 20:14
Programm3r7-Jan-07 20:14 
AnswerRe: Weird Issue in "if" statement Pin
Guffa7-Jan-07 21:15
Guffa7-Jan-07 21:15 
QuestionRe: Weird Issue in "if" statement Pin
Programm3r7-Jan-07 21:25
Programm3r7-Jan-07 21:25 
Some more info:

if (Request.QueryString("action") == "save")
{
    var publicHoliday = Server.CreateObject("ADODB.Recordset");
    publicHoliday.ActiveConnection = MM_test_STRING;
    publicHoliday.Source = "SELECT * FROM Table1";
    publicHoliday.CursorType = 0;
    publicHoliday.CursorLocation = 2;
    publicHoliday.LockType = 1;
    publicHoliday.Open();

    var dayDate = Request.QueryString("daydate");
    var empCoid = Request.QueryString("coid");
    var Desc = Request.QueryString("desc");
    var setSave = Server.CreateObject("ADODB.Recordset");
    var getPHolidayInfo = Server.CreateObject("ADODB.Recordset");
    var indi = false;

    var getAbsentsCode = Server.CreateObject("ADODB.Recordset");
    getAbsentsCode.ActiveConnection = MM_test_STRING;
    getAbsentsCode.Source = "SELECT * FROM Table2 WHERE DESCRIPTION = "+Desc+"";
    getAbsentsCode.CursorType = 0;
    getAbsentsCode.CursorLocation = 2;
    getAbsentsCode.LockType = 1;
    getAbsentsCode.Open();
    var getCode = getAbsentsCode.Fields.Item("ABSENCECODE").Value;
    if (Request.QueryString("coid") == "" && Request.QueryString("surname") == "")
    {
        while (!publicHoliday.EOF)
        {
            var pDate = publicHoliday.Fields.Item("HOLIDAYDATE").Value; //YYYY-MM-DD
            var pDesc = publicHoliday.Fields.Item("DESCRIPTION").Value;

            if(Desc == "'Public Holiday'")
            {
                indi = false;
            }
            else
            {
                var FormPHYear = String(dayDate).substring(1,5);
                //Response.Write("FormPHYear ->"+FormPHYear);
                var DBPHYear = String(pDate).substring(0,4);
                //Response.Write("DBPHYear ->"+DBPHYear);
                //Response.Write(FormPHYear > DBPHYear);
                if (FormPHYear > DBPHYear)
                {
                    indi = false;
                }
                else
                {
                    if (Desc == "'"+pDesc+"'")
                    {
                         %>

                         <%
                         //Response.End();
                         indi = true;
                    }
                }
            }
            publicHoliday.MoveNext();
        }
        if (indi == false)
        {
            setSave.ActiveConnection = MM_test_STRING;
            setSave.Source = "INSERT INTO Table1(HOLIDAYDATE,DESCRIPTION,ABSENCECODE) VALUES("+dayDate+","+Desc+",'"+getCode+"')";
            setSave.CursorType = 0;
            setSave.CursorLocation = 2;
            setSave.LockType = 1;
            setSave.Open();

            var strOne = new String(dayDate);
            var strTwo = new String(Request.QueryString("enddate"));
            Response.Write(Request.QueryString("action"));
            Response.Write("If Statement -> "+ String(strOne == strTwo));
            Response.Write(strOne);
            Response.Write(strTwo);

            Response.End();

            if (Number(dayDate) == Number(Request.QueryString("enddate")))
            {
                Response.Write("svdvdvdvdvdv");
                Response.End();
                getPHolidayInfo.ActiveConnection = MM_test_STRING;
                getPHolidayInfo.Source = "SELECT * FROM Table2 WHERE DESCRIPTION = 'Public Holiday'";
                getPHolidayInfo.CursorType = 0;
                getPHolidayInfo.CursorLocation = 2;
                getPHolidayInfo.LockType = 1;
                getPHolidayInfo.Open();

                var PHDayDesc = getPHolidayInfo.Fields.Item("DESCRIPTION").Value;
                var PHDayCode = getPHolidayInfo.Fields.Item("ABSENCECODE").Value;

                var PHDay = String(dayDate).substring(9,11);
                PHDay = Number(PHDay)+1;
                if (PHDay < 10)
                {
                    PHDay = '0'+PHDay;
                }
                var PHMonth = String(dayDate).substring(6,8);
                /*if (PHMonth < 10)
                {
                    PHMonth = '0'+PHMonth;
                }*/
                var PHYear = String(dayDate).substring(1,5);
                var PHAll = PHYear+"-"+PHMonth+"-"+PHDay;

                setSave.ActiveConnection = MM_test_STRING;
                setSave.Source = "INSERT INTO ACTA.PHOLIDAY(HOLIDAYDATE,DESCRIPTION,ABSENCECODE) VALUES('"+PHAll+"','"+PHDayDesc+"','"+PHDayCode+"')";
                setSave.CursorType = 0;
                setSave.CursorLocation = 2;
                setSave.LockType = 1;
                setSave.Open();
            }
        }


Does this help



The only programmers that are better than C programmers are those who code in 1's and 0's..... Smile | :)

Smile | :) Programm3r

AnswerRe: Weird Issue in &quot;if&quot; statement Pin
Guffa8-Jan-07 0:23
Guffa8-Jan-07 0:23 
AnswerRe: Weird Issue in &quot;if&quot; statement Pin
webProgrammer8-Jan-07 11:34
webProgrammer8-Jan-07 11:34 
Questionhelp in curl Pin
Rock Star.7-Jan-07 18:30
Rock Star.7-Jan-07 18:30 
AnswerRe: help in curl Pin
Programm3r7-Jan-07 20:18
Programm3r7-Jan-07 20:18 
Questioncalling perl while refreshing my web page Pin
Member 37025437-Jan-07 15:57
Member 37025437-Jan-07 15:57 
QuestionWhat are the benefits of PKI Pin
bob.e.baker5-Jan-07 6:39
bob.e.baker5-Jan-07 6:39 
AnswerRe: What are the benefits of PKI Pin
Vasudevan Deepak Kumar5-Jan-07 22:15
Vasudevan Deepak Kumar5-Jan-07 22:15 
Questionabout charting Pin
Member 36969665-Jan-07 4:17
Member 36969665-Jan-07 4:17 
AnswerRe: about charting Pin
Vasudevan Deepak Kumar5-Jan-07 22:16
Vasudevan Deepak Kumar5-Jan-07 22:16 
Questiondoubt on javascript Pin
jithus5-Jan-07 3:16
jithus5-Jan-07 3:16 
AnswerRe: Now I want to put that control on my web form Pin
Paddy Boyd5-Jan-07 1:16
Paddy Boyd5-Jan-07 1:16 
QuestionStarting a website in IIS (Windows 2003 Server) Pin
Programm3r3-Jan-07 19:00
Programm3r3-Jan-07 19:00 
AnswerRe: Starting a website in IIS (Windows 2003 Server) Pin
Programm3r3-Jan-07 21:43
Programm3r3-Jan-07 21:43 
QuestionWeb Services [modified] Pin
ashishnagar13-Jan-07 18:30
ashishnagar13-Jan-07 18:30 
AnswerRe: Web Services Pin
Programm3r4-Jan-07 0:06
Programm3r4-Jan-07 0:06 
QuestionGreasemonkey/CPhog has stopped working Pin
Kevin McFarlane3-Jan-07 0:15
Kevin McFarlane3-Jan-07 0:15 
Questionopen a open dialog using html(Not using html file) Pin
Malayil alex2-Jan-07 23:04
Malayil alex2-Jan-07 23:04 

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.