using System;
using System.Data;
/****************************************************************************************************************************
* Project Name    : TimeCheck                                              Created On  : 12-Aug-2007
* Module          : Shift Pattern                                          Modified On : 19-July-2007
* Created By      : Janakaraj.P
* Modified By     : 
* Current Storage : \\Angler56\Projects\Inprogress\SCREEN1206\code\Time_AttendanceApp
* BackUp          :
****************************************************************************************************************************/
public partial class Masters_ShiftPatternServer : Base.BasePage
{
    protected override void Page_Load(object sender, EventArgs e)
    {
        // session checking and reset date format
        base.Page_Load(sender, e);
        Response.Clear();
        if ((Request.QueryString["newvalue"] != null) && (Request.QueryString["ddlno"] != null))
        {
            UpdateShiftPattern(Convert.ToInt32(Request.QueryString["ddlno"].ToString()), Convert.ToInt32(Request.QueryString["newvalue"].ToString()));
        }
        Response.End();
    }
    private void UpdateShiftPattern(int ddlno, int newvalue)
    {
        DataSet ds_Pattern = new DataSet();
        ds_Pattern = (DataSet)Session["ds_Pattern"];
        string strShift = "Day" + ddlno + "_Shift";
        foreach (DataRow Drow in ds_Pattern.Tables[0].Rows)
        {
            Drow[strShift] = newvalue;
        }
        Session["ds_Pattern"] = ds_Pattern;
    }
}
