protected void dgvJobSearch_ItemCommand(object source, DataGridCommandEventArgs e) { if (e.CommandName == "BID") { string strBid = serviceus.getMaxId("SERVICEUS_BID", "BID_ID"); int Bid= Convert.ToInt32(strBid); string strJobTile = (string)((Label)e.Item.Cells[0].Controls[3]).Text;//Desc string strTransactionid = (string)((Label)e.Item.Cells[0].Controls[7]).Text;//Time string strMember = (string)((Label)e.Item.Cells[0].Controls[11]).Text;//Time string strDescrption = (string)((Label)e.Item.Cells[0].Controls[13]).Text;//Time string strAmount = (string)((TextBox)e.Item.Cells[0].Controls[17]).Text;//Time string strCooment = (string)((TextBox)e.Item.Cells[0].Controls[21]).Text;//Time DateTime strProjectEndDate = (DateTime)(Convert.ToDateTime(((Label)e.Item.Cells[0].Controls[29]).Text));//Time string strProviderId = (string)((Label)e.Item.Cells[0].Controls[31]).Text;//Time string strProjectId = (string)((Label)e.Item.Cells[0].Controls[33]).Text;//Time //int strUserId = Convert.ToInt32(Session["Userid"].ToString()); TimeSpan strPEndDate = strProjectEndDate - DateTime.Now; string strPEDATE = strPEndDate.Days.ToString(); string strBidCount = serviceus.Get_SERVICEUS_BIDS_COUNT(strProjectId); int strUserId = 1; strBidCount = strBidCount + 1; serviceus.UPDATE_SERVICEUS_BIDS_COUNT(strProjectId, strBidCount); //strPEndDate.Days; serviceus.Insert_ServiceUs_BID(Bid, strAmount, "", strPEDATE, DateTime.Now.ToShortDateString(), strProviderId, strProjectId, strBidCount, strTransactionid, strUserId, "PENDING"); } }
FindControl
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)