protected void btnFind_Click(object sender, EventArgs e)
    {
        condObj = new HR_SchClass();

        if(txtSchClassid.Value !="" )
            condObj.Like(HR_SchClass.Attribute.SchClassid, Convert.ToInt32(txtSchClassid.Value));

        if(txtSchName.Value !="" )
            condObj.Like(HR_SchClass.Attribute.SchName, Convert.ToString(txtSchName.Value));

        if(txtStartHour.Value !="" )
            condObj.Like(HR_SchClass.Attribute.StartHour, Convert.ToInt32(txtStartHour.Value));

        if(txtStartMin.Value !="" )
            condObj.Like(HR_SchClass.Attribute.StartMin, Convert.ToInt32(txtStartMin.Value));

        if(txtEndHour.Value !="" )
            condObj.Like(HR_SchClass.Attribute.EndHour, Convert.ToInt32(txtEndHour.Value));

        if(txtEndMin.Value !="" )
            condObj.Like(HR_SchClass.Attribute.EndMin, Convert.ToInt32(txtEndMin.Value));

        if(txtLateMinutes.Value !="" )
            condObj.Like(HR_SchClass.Attribute.LateMinutes, Convert.ToInt32(txtLateMinutes.Value));

        if(txtEarlyMinutes.Value !="" )
            condObj.Like(HR_SchClass.Attribute.EarlyMinutes, Convert.ToInt32(txtEarlyMinutes.Value));

        if(txtCheckIn.Value !="" )
            condObj.CheckIn = Convert.ToBoolean(txtCheckIn.Checked);

        if(txtCheckOut.Value !="" )
            condObj.CheckOut = Convert.ToBoolean(txtCheckOut.Checked);

        if(txtCheckInHour1.Value !="" )
            condObj.Like(HR_SchClass.Attribute.CheckInHour1, Convert.ToInt32(txtCheckInHour1.Value));

        if(txtCheckInMin1.Value !="" )
            condObj.Like(HR_SchClass.Attribute.CheckInMin1, Convert.ToInt32(txtCheckInMin1.Value));

        if(txtCheckInHour2.Value !="" )
            condObj.Like(HR_SchClass.Attribute.CheckInHour2, Convert.ToInt32(txtCheckInHour2.Value));

        if(txtCheckInMin2.Value !="" )
            condObj.Like(HR_SchClass.Attribute.CheckInMin2, Convert.ToInt32(txtCheckInMin2.Value));

        if(txtCheckOutHour1.Value !="" )
            condObj.Like(HR_SchClass.Attribute.CheckOutHour1, Convert.ToInt32(txtCheckOutHour1.Value));

        if(txtCheckOutMin1.Value !="" )
            condObj.Like(HR_SchClass.Attribute.CheckOutMin1, Convert.ToInt32(txtCheckOutMin1.Value));

        if(txtCheckOutHour2.Value !="" )
            condObj.Like(HR_SchClass.Attribute.CheckOutHour2, Convert.ToInt32(txtCheckOutHour2.Value));

        if(txtCheckOutMin2.Value !="" )
            condObj.Like(HR_SchClass.Attribute.CheckOutMin2, Convert.ToInt32(txtCheckOutMin2.Value));

        if(txtColor.Value !="" )
            condObj.Like(HR_SchClass.Attribute.Color, Convert.ToInt32(txtColor.Value));

        if(txtIsOvertime.Value !="" )
            condObj.IsOverTime = Convert.ToBoolean(txtIsOvertime.Checked);

        hidCondition.Value = condObj.ToJson(20);

        BindList(condObj, 1);
    }
    protected void btnFind_Click(object sender, EventArgs e)
    {
        condObj = new HR_SchClass();

        if(txtSchClassid.Value !="" )
            condObj.Like_OR(HR_SchClass.Attribute.SchClassid, Convert.ToInt32(txtSchClassid.Value));

        if(txtSchName.Value !="" )
            condObj.Like_OR(HR_SchClass.Attribute.SchName, Convert.ToString(txtSchName.Value));

        if(txtStartHour.Value !="" )
            condObj.Like_OR(HR_SchClass.Attribute.StartHour, Convert.ToInt32(txtStartHour.Value));

        if(txtStartMin.Value !="" )
            condObj.Like_OR(HR_SchClass.Attribute.StartMin, Convert.ToInt32(txtStartMin.Value));

        if(txtEndHour.Value !="" )
            condObj.Like_OR(HR_SchClass.Attribute.EndHour, Convert.ToInt32(txtEndHour.Value));

        if(txtEndMin.Value !="" )
            condObj.Like_OR(HR_SchClass.Attribute.EndMin, Convert.ToInt32(txtEndMin.Value));

        if(txtLateMinutes.Value !="" )
            condObj.Like_OR(HR_SchClass.Attribute.LateMinutes, Convert.ToInt32(txtLateMinutes.Value));

        if(txtEarlyMinutes.Value !="" )
            condObj.Like_OR(HR_SchClass.Attribute.EarlyMinutes, Convert.ToInt32(txtEarlyMinutes.Value));

        if(txtCheckIn.Value !="" )
            condObj.CheckIn = Convert.ToBoolean(txtCheckIn.Checked);

        if(txtCheckOut.Value !="" )
            condObj.CheckOut = Convert.ToBoolean(txtCheckOut.Checked);

        if(txtCheckInHour1.Value !="" )
            condObj.Like_OR(HR_SchClass.Attribute.CheckInHour1, Convert.ToInt32(txtCheckInHour1.Value));

        if(txtCheckInMin1.Value !="" )
            condObj.Like_OR(HR_SchClass.Attribute.CheckInMin1, Convert.ToInt32(txtCheckInMin1.Value));

        if(txtCheckInHour2.Value !="" )
            condObj.Like_OR(HR_SchClass.Attribute.CheckInHour2, Convert.ToInt32(txtCheckInHour2.Value));

        if(txtCheckInMin2.Value !="" )
            condObj.Like_OR(HR_SchClass.Attribute.CheckInMin2, Convert.ToInt32(txtCheckInMin2.Value));

        if(txtCheckOutHour1.Value !="" )
            condObj.Like_OR(HR_SchClass.Attribute.CheckOutHour1, Convert.ToInt32(txtCheckOutHour1.Value));

        if(txtCheckOutMin1.Value !="" )
            condObj.Like_OR(HR_SchClass.Attribute.CheckOutMin1, Convert.ToInt32(txtCheckOutMin1.Value));

        if(txtCheckOutHour2.Value !="" )
            condObj.Like_OR(HR_SchClass.Attribute.CheckOutHour2, Convert.ToInt32(txtCheckOutHour2.Value));

        if(txtCheckOutMin2.Value !="" )
            condObj.Like_OR(HR_SchClass.Attribute.CheckOutMin2, Convert.ToInt32(txtCheckOutMin2.Value));

        if(txtColor.Value !="" )
            condObj.Like_OR(HR_SchClass.Attribute.Color, Convert.ToInt32(txtColor.Value));

        if(txtIsOvertime.Value !="" )
            condObj.IsOverTime = Convert.ToBoolean(txtIsOvertime.Checked);

        try
        {
            hidCondition.Value = condObj.ToJson(20);

            listObj = BLLTable<HR_SchClass>.Factory(conn).SelectByPage(valObj, condObj, aspPager.PageSize, 1, ref recount);
            repList.DataSource = listObj;
            repList.DataBind();
        }
        catch (Exception ex)
        {
             litWarn.Text = ex.Message;
        }
    }
    protected void btnFind_Click(object sender, EventArgs e)
    {
        condObj = new HR_SchClass();


        if (txtSchClassid.Value != "")
        {
            condObj.Like_OR(HR_SchClass.Attribute.SchClassid, Convert.ToInt32(txtSchClassid.Value));
        }


        if (txtSchName.Value != "")
        {
            condObj.Like_OR(HR_SchClass.Attribute.SchName, Convert.ToString(txtSchName.Value));
        }


        if (txtStartHour.Value != "")
        {
            condObj.Like_OR(HR_SchClass.Attribute.StartHour, Convert.ToInt32(txtStartHour.Value));
        }


        if (txtStartMin.Value != "")
        {
            condObj.Like_OR(HR_SchClass.Attribute.StartMin, Convert.ToInt32(txtStartMin.Value));
        }


        if (txtEndHour.Value != "")
        {
            condObj.Like_OR(HR_SchClass.Attribute.EndHour, Convert.ToInt32(txtEndHour.Value));
        }


        if (txtEndMin.Value != "")
        {
            condObj.Like_OR(HR_SchClass.Attribute.EndMin, Convert.ToInt32(txtEndMin.Value));
        }


        if (txtLateMinutes.Value != "")
        {
            condObj.Like_OR(HR_SchClass.Attribute.LateMinutes, Convert.ToInt32(txtLateMinutes.Value));
        }


        if (txtEarlyMinutes.Value != "")
        {
            condObj.Like_OR(HR_SchClass.Attribute.EarlyMinutes, Convert.ToInt32(txtEarlyMinutes.Value));
        }


        if (txtCheckIn.Value != "")
        {
            condObj.CheckIn = Convert.ToBoolean(txtCheckIn.Checked);
        }


        if (txtCheckOut.Value != "")
        {
            condObj.CheckOut = Convert.ToBoolean(txtCheckOut.Checked);
        }


        if (txtCheckInHour1.Value != "")
        {
            condObj.Like_OR(HR_SchClass.Attribute.CheckInHour1, Convert.ToInt32(txtCheckInHour1.Value));
        }


        if (txtCheckInMin1.Value != "")
        {
            condObj.Like_OR(HR_SchClass.Attribute.CheckInMin1, Convert.ToInt32(txtCheckInMin1.Value));
        }


        if (txtCheckInHour2.Value != "")
        {
            condObj.Like_OR(HR_SchClass.Attribute.CheckInHour2, Convert.ToInt32(txtCheckInHour2.Value));
        }


        if (txtCheckInMin2.Value != "")
        {
            condObj.Like_OR(HR_SchClass.Attribute.CheckInMin2, Convert.ToInt32(txtCheckInMin2.Value));
        }


        if (txtCheckOutHour1.Value != "")
        {
            condObj.Like_OR(HR_SchClass.Attribute.CheckOutHour1, Convert.ToInt32(txtCheckOutHour1.Value));
        }


        if (txtCheckOutMin1.Value != "")
        {
            condObj.Like_OR(HR_SchClass.Attribute.CheckOutMin1, Convert.ToInt32(txtCheckOutMin1.Value));
        }


        if (txtCheckOutHour2.Value != "")
        {
            condObj.Like_OR(HR_SchClass.Attribute.CheckOutHour2, Convert.ToInt32(txtCheckOutHour2.Value));
        }


        if (txtCheckOutMin2.Value != "")
        {
            condObj.Like_OR(HR_SchClass.Attribute.CheckOutMin2, Convert.ToInt32(txtCheckOutMin2.Value));
        }


        if (txtColor.Value != "")
        {
            condObj.Like_OR(HR_SchClass.Attribute.Color, Convert.ToInt32(txtColor.Value));
        }


        if (txtIsOvertime.Value != "")
        {
            condObj.IsOverTime = Convert.ToBoolean(txtIsOvertime.Checked);
        }

        try
        {
            hidCondition.Value = condObj.ToJson(20);

            listObj = BLLTable <HR_SchClass> .Factory(conn).SelectByPage(valObj, condObj, aspPager.PageSize, 1, ref recount);

            repList.DataSource = listObj;
            repList.DataBind();
        }
        catch (Exception ex)
        {
            litWarn.Text = ex.Message;
        }
    }
示例#4
0
    protected void btnFind_Click(object sender, EventArgs e)
    {
        condObj = new HR_SchClass();



        if (txtSchClassid.Value != "")
        {
            condObj.Like(HR_SchClass.Attribute.SchClassid, Convert.ToInt32(txtSchClassid.Value));
        }


        if (txtSchName.Value != "")
        {
            condObj.Like(HR_SchClass.Attribute.SchName, Convert.ToString(txtSchName.Value));
        }


        if (txtStartHour.Value != "")
        {
            condObj.Like(HR_SchClass.Attribute.StartHour, Convert.ToInt32(txtStartHour.Value));
        }


        if (txtStartMin.Value != "")
        {
            condObj.Like(HR_SchClass.Attribute.StartMin, Convert.ToInt32(txtStartMin.Value));
        }


        if (txtEndHour.Value != "")
        {
            condObj.Like(HR_SchClass.Attribute.EndHour, Convert.ToInt32(txtEndHour.Value));
        }


        if (txtEndMin.Value != "")
        {
            condObj.Like(HR_SchClass.Attribute.EndMin, Convert.ToInt32(txtEndMin.Value));
        }


        if (txtLateMinutes.Value != "")
        {
            condObj.Like(HR_SchClass.Attribute.LateMinutes, Convert.ToInt32(txtLateMinutes.Value));
        }


        if (txtEarlyMinutes.Value != "")
        {
            condObj.Like(HR_SchClass.Attribute.EarlyMinutes, Convert.ToInt32(txtEarlyMinutes.Value));
        }


        if (txtCheckIn.Value != "")
        {
            condObj.CheckIn = Convert.ToBoolean(txtCheckIn.Checked);
        }


        if (txtCheckOut.Value != "")
        {
            condObj.CheckOut = Convert.ToBoolean(txtCheckOut.Checked);
        }


        if (txtCheckInHour1.Value != "")
        {
            condObj.Like(HR_SchClass.Attribute.CheckInHour1, Convert.ToInt32(txtCheckInHour1.Value));
        }


        if (txtCheckInMin1.Value != "")
        {
            condObj.Like(HR_SchClass.Attribute.CheckInMin1, Convert.ToInt32(txtCheckInMin1.Value));
        }


        if (txtCheckInHour2.Value != "")
        {
            condObj.Like(HR_SchClass.Attribute.CheckInHour2, Convert.ToInt32(txtCheckInHour2.Value));
        }


        if (txtCheckInMin2.Value != "")
        {
            condObj.Like(HR_SchClass.Attribute.CheckInMin2, Convert.ToInt32(txtCheckInMin2.Value));
        }


        if (txtCheckOutHour1.Value != "")
        {
            condObj.Like(HR_SchClass.Attribute.CheckOutHour1, Convert.ToInt32(txtCheckOutHour1.Value));
        }


        if (txtCheckOutMin1.Value != "")
        {
            condObj.Like(HR_SchClass.Attribute.CheckOutMin1, Convert.ToInt32(txtCheckOutMin1.Value));
        }


        if (txtCheckOutHour2.Value != "")
        {
            condObj.Like(HR_SchClass.Attribute.CheckOutHour2, Convert.ToInt32(txtCheckOutHour2.Value));
        }


        if (txtCheckOutMin2.Value != "")
        {
            condObj.Like(HR_SchClass.Attribute.CheckOutMin2, Convert.ToInt32(txtCheckOutMin2.Value));
        }


        if (txtColor.Value != "")
        {
            condObj.Like(HR_SchClass.Attribute.Color, Convert.ToInt32(txtColor.Value));
        }


        if (txtIsOvertime.Value != "")
        {
            condObj.IsOverTime = Convert.ToBoolean(txtIsOvertime.Checked);
        }

        hidCondition.Value = condObj.ToJson(20);

        BindList(condObj, 1);
    }