protected void Page_Load(object sender, EventArgs e) { strcon = Convert.ToString(Request.QueryString[0]); if (!IsPostBack) { objEventMyctBLL.Id1 = Convert.ToInt16(strcon); objEventMyctBLL.Selectrecord(objEventMyctBLL); lblBrideName.Text = Convert.ToString(objEventMyctBLL.BrideName1); lblGroomName.Text = Convert.ToString(objEventMyctBLL.GroomName1); //lblInvitationFrom.Text = Convert.ToString(objEventMyctBLL.InvitionFrom1); lblDateOfMarrage.Text = Convert.ToString(DateSplit(objEventMyctBLL.DateOfMgs1)); //lblTimeOfMarrage.Text = Convert.ToString(objEventMyctBLL.TimeOfMgs1); //lblLocation.Text = Convert.ToString(objEventMyctBLL.Location1); // txtDiscription.Text = Convert.ToString(objEventMyctBLL.SpecialDescription1); string FristName = Convert.ToString(objEventMyctBLL.FristName1); string LastName = Convert.ToString(objEventMyctBLL.LastName1); lblPreshak.Text = FristName + " " + LastName; // lblMobile.Text = Convert.ToString(objEventMyctBLL.MobileNo1); lblAddress.Text = Convert.ToString(objEventMyctBLL.Address1); lblMgs.Text = Convert.ToString(objEventMyctBLL.SendMgs1); // rdbPriority.Text = Convert.ToString(objEventMyctBLL.Priority1); //------------------------------Faithfully----------------------------- objEventMyctBLL.UsrUserId = Convert.ToString(Session["User"].ToString()); objEventMyctBLL.SelectUserRecord(objEventMyctBLL); string FirstNameUser = Convert.ToString(objEventMyctBLL.UsrFirstName); string LastNameUser = Convert.ToString(objEventMyctBLL.UsrLastName); lblFaithfully.Text = FirstNameUser + " " + LastNameUser; } }
protected void gvItem_RowCommand1(object sender, GridViewCommandEventArgs e) { if (Convert.ToString(e.CommandName) == "Modify") { btnSubmit.Text = "Update"; string Id = Convert.ToString(e.CommandArgument); lblId.Text = Id; objEventMyctBLL.Id1 = Convert.ToInt16(Id); objEventMyctBLL.Selectrecord(objEventMyctBLL); txtBrideName.Text = Convert.ToString(objEventMyctBLL.BrideName1); txtGroom.Text = Convert.ToString(objEventMyctBLL.GroomName1); rdbInvite.Text = Convert.ToString(objEventMyctBLL.InvitionFrom1); txtDateOfMgs.Text = Convert.ToString(objEventMyctBLL.Date1); //txtDateOfMgs.Text = Convert.ToString(DateSplitUpdate(objEventMyctBLL.DateOfMgs1)); txtTime.Text = Convert.ToString(objEventMyctBLL.Time1); txtRemDate.Text = Convert.ToString(objEventMyctBLL.RemDate1); txtRemTime.Text = Convert.ToString(objEventMyctBLL.RemTime1); txtLocation.Text = Convert.ToString(objEventMyctBLL.Location1); txtMobileNo.Text = Convert.ToString(objEventMyctBLL.MobileNumber1); txtPersonName.Text = Convert.ToString(objEventMyctBLL.PersonName1); rbtnPvisit.Text = Convert.ToString(objEventMyctBLL.PVisit1); txtTextMgs.Text = Convert.ToString(objEventMyctBLL.MDescp1); //txtTextMgs.Text = Convert.ToString(objEventMyctBLL.SendMgs1); //string[] tmp = Data.Split(':'); //if (Convert.ToInt32(tmp[0].ToString()) < 12) //{ // StartTime.SetTime(Convert.ToInt32(tmp[0].ToString()), Convert.ToInt32(tmp[1].ToString()), Convert.ToInt32(tmp[2].ToString()), MKB.TimePicker.TimeSelector.AmPmSpec.AM); //} //else //{ // StartTime.SetTime(Convert.ToInt32(tmp[0].ToString()), Convert.ToInt32(tmp[1].ToString()), Convert.ToInt32(tmp[2].ToString()), MKB.TimePicker.TimeSelector.AmPmSpec.PM); //} } if (Convert.ToString(e.CommandName) == "Delete") { string Id = Convert.ToString(e.CommandArgument); lblId.Text = Id; objEventMyctBLL.Id1 = Convert.ToInt16(Id); con.Open(); string str = "Delete From [Come2myCityDB].[dbo].[tbl_EventMyCt] where Id='" + Id + "'"; SqlCommand cmd = new SqlCommand(str, con); cmd.ExecuteNonQuery(); con.Close(); } }