protected void ddllicence_SelectedIndexChanged(object sender, EventArgs e) { p.AdminFetchID = 2; table = f.AdminFetchshipmentdetail(p); txtlicence.Value = table.Rows[0][1].ToString().Trim(); txtarea.Value = table.Rows[0][3].ToString().Trim(); txtcnic.Value = table.Rows[0][2].ToString().Trim(); txtreceivedate.Value = table.Rows[0][1].ToString().Trim(); slctdistrict.SelectedValue = table.Rows[0][1].ToString().Trim(); ddlreceiveby.SelectedValue = table.Rows[0][1].ToString().Trim(); }
protected void btnsubmit_Click(object sender, EventArgs e) { P.AdminInsertshipmentid = txtlicence.Value; P.AdminInsertshipmentcnic = txtcnic.Value; P.AdminInsertshipmentdistrict = Convert.ToInt32(slctdistrict.SelectedValue); P.AdminInsertshipmentcreatedby = Convert.ToInt32(Session["username"]); P.AdminInsertshipmentstatus = 1; P.AdminInsertshipmentaddress = Convert.ToString(txtarea.Value); P.AdminFetchID = Convert.ToInt32(txtlicence.Value); dt = f.AdminFetchshipmentdetail(P); if (dt.Rows[0][0] != null) { insert.AdminInsertshipmentdetail(P); } else { } }