asiehmohammadian
دوشنبه 18 اردیبهشت 1391, 19:37 عصر
سلام
من یک گریدویو دارم در انتهای هر سطرگرید یک دکمه گذاشتم به نام انتخاب که مدیر باکلیک روی اون وارد صفحه دیگه ای میشه که میتونه تمام اطلاعات اون سطر انتخابی و به طور کامل ببینه
دراین قسمت تعدادی از فیلدها که فقط برای نمایش به مدیر است به صورت read only است وبعضی از فیلدها توسط مدیر قابل ویرایش است
درانتهای این صفحه یک دکمه بروزرسانی ویک دکمه حذف گذاشتم ، کدی که برای دکمه حذف نوشتم درست کارنمیکنه میشه لطف کنید ببینید عیبش چیه؟
این کدمه:
SqlDataAdapter da = new SqlDataAdapter("delete from t_register where re_fname='" + txtname.Text + "'and re_lname='" + txtlname.Text + "'and re_username='" + txtusername.Text + "'and re_pass='" + txtpass.Text + "' and re_companyname='" + txtcompanyname.Text + "' and re_type='" + txttype.Text + "' and re_typeofproperty='" + txtproperty.Text + "' and re_economiccode='" + txtcode.Text + "' and re_province='" + txtprovince.Text + "' and re_city='" + txtcity.Text + "' and re_website='" + txtweb.Text + "' and re_mobile='" + txtmobile.Text + "' and re_tell='" + txttell.Text + "' and re_fax='" + txtfax.Text + "' and re_email='" + txtemail.Text + "' and re_maritalstatus='" + txtmarital.Text + "' and re_sex='" + txtsex.Text + "' and re_birth='" + txtbirth.Text + "' and re_marriage='" + txtmarriage.Text + "' and re_degree='" + txtdegree.Text + "' and re_lists='" + txtlists.Text + "' and re_color='" + txtcolor.Text + "' and re_costumer='" + ddltype.Text + "' and re_status='" + ddlstatus.Text + "' and re_address='" + txtaddress.Text + "' and re_auther='" + txtauther.Text + "' and re_creation='" + txtdate.Text + "' and re_how='" + txthow.Text + "' and re_description='" + txtdescription.Text + "'", cn);
DataSet ds = new DataSet();
da.Fill(ds, "table");
Response.Redirect("Costumer.aspx");
خواهش میکنم کمکم کنید
ممنون از لطفتون
من یک گریدویو دارم در انتهای هر سطرگرید یک دکمه گذاشتم به نام انتخاب که مدیر باکلیک روی اون وارد صفحه دیگه ای میشه که میتونه تمام اطلاعات اون سطر انتخابی و به طور کامل ببینه
دراین قسمت تعدادی از فیلدها که فقط برای نمایش به مدیر است به صورت read only است وبعضی از فیلدها توسط مدیر قابل ویرایش است
درانتهای این صفحه یک دکمه بروزرسانی ویک دکمه حذف گذاشتم ، کدی که برای دکمه حذف نوشتم درست کارنمیکنه میشه لطف کنید ببینید عیبش چیه؟
این کدمه:
SqlDataAdapter da = new SqlDataAdapter("delete from t_register where re_fname='" + txtname.Text + "'and re_lname='" + txtlname.Text + "'and re_username='" + txtusername.Text + "'and re_pass='" + txtpass.Text + "' and re_companyname='" + txtcompanyname.Text + "' and re_type='" + txttype.Text + "' and re_typeofproperty='" + txtproperty.Text + "' and re_economiccode='" + txtcode.Text + "' and re_province='" + txtprovince.Text + "' and re_city='" + txtcity.Text + "' and re_website='" + txtweb.Text + "' and re_mobile='" + txtmobile.Text + "' and re_tell='" + txttell.Text + "' and re_fax='" + txtfax.Text + "' and re_email='" + txtemail.Text + "' and re_maritalstatus='" + txtmarital.Text + "' and re_sex='" + txtsex.Text + "' and re_birth='" + txtbirth.Text + "' and re_marriage='" + txtmarriage.Text + "' and re_degree='" + txtdegree.Text + "' and re_lists='" + txtlists.Text + "' and re_color='" + txtcolor.Text + "' and re_costumer='" + ddltype.Text + "' and re_status='" + ddlstatus.Text + "' and re_address='" + txtaddress.Text + "' and re_auther='" + txtauther.Text + "' and re_creation='" + txtdate.Text + "' and re_how='" + txthow.Text + "' and re_description='" + txtdescription.Text + "'", cn);
DataSet ds = new DataSet();
da.Fill(ds, "table");
Response.Redirect("Costumer.aspx");
خواهش میکنم کمکم کنید
ممنون از لطفتون