for (int i = 0; i < grdhd.Items.Count; i++) { if ((grdhd.Items[i].FindControl("chkhd") as CheckBox).Checked) { <big>string[] appdate = grdhd.Items[i].Cells[1].Text.Split('/');</big> days = Convert.ToSingle(days - 0.5); objhd.EmpCode = Session["EmpCode"].ToString(); objhd.EmpNo = Convert.ToInt32(Session["UserID"]); objhd.Day = grdhd.Items[i].Cells[2].Text; objhd.hddates = Convert.ToDateTime(appdate[1].ToString() + "/" + appdate[0].ToString() + "/" + appdate[2].ToString()); objhd.Slot = (grdhd.Items[i].FindControl("ddlslot") as DropDownList).SelectedItem.Text; if (Session["UserName"] != null) objhd.CreatedBy = Session["UserName"].ToString(); objhd.CreatedDate = System.DateTime.Now; objhd.ModifiedBy = ""; objhd.ModifiedDate = System.DateTime.Now; objhd.DeletedFlag = '0'; objhd.Insert(objhd); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)