private void PayForSharj(int price, string AllReq) { ClRequestTraffic cl = new ClRequestTraffic(); cl.ALlRequest = AllReq; cl.PersonalID = Convert.ToInt32(lblPersonID.Text); cl.PayForShajDate = DateTime.Now.ToString(); cl.AllPrice = price; int t = RequestTrafficClass.UpdateAllReqPayForShaj(cl); if (t == 0) { TerraficPlanBLL.Utility.ShowMsg(Page, ProPertyData.MsgType.warning, "خطا در سیستم"); } else if (t == -10) { TerraficPlanBLL.Utility.ShowMsg(Page, ProPertyData.MsgType.warning, "شارژ موجود کم میباشد.لطفا یا پرداخت آنلاین نمایید یا شارژ خود را افزایش دهید"); } else { BindGrid(); string error = ""; error = SendRequestToWS(AllReq); if (error != "") { TerraficPlanBLL.Utility.ShowMsg(Page, ProPertyData.MsgType.warning, error); } } }
private void BindGrid() { ClRequestTraffic cl = new ClRequestTraffic(); cl.PersonalID = Convert.ToInt32(lblPersonID.Text); cl.RepeatTypeID = 6; cl.YearID = Convert.ToInt32(ddYear.SelectedValue); cl.YearIDfilter = Convert.ToInt32(ddDefauleYear.SelectedValue); DataSet ds = RequestTrafficClass.GetList_filter_year(cl); DataView dv = new DataView(ds.Tables[0]); if (ViewState["RequestTrafficID"] == null) { ViewState["RequestTrafficID"] = "RequestTrafficID Desc"; } dv.Sort = Securenamespace.SecureData.CheckSecurity(ViewState["RequestTrafficID"].ToString()).ToString(); GridView1.DataSource = dv; GridView1.DataBind(); BindCar(); BindDiscount(); if (ds.Tables[0].Rows.Count > 0) { rdcurrentSharj.Text = "با استفاده از شارژ موجود به مبلغ" + ds.Tables[0].Rows[0]["SharjCurrent"].ToString(); } ds.Dispose(); }
public void bindPElak() { ClRequestTraffic cl = new ClRequestTraffic(); if (Lbl_RahCode.Text != "0") { cl.TrackingCode = Lbl_RahCode.Text; } if (Lbl_RequestTrafficID.Text != "0") { cl.RequestTrafficID = Convert.ToInt32(Lbl_RequestTrafficID.Text); } DataSet ds = TrafficPlanDAL.RequestTrafficClass.GetList(cl); DataRow dr = ds.Tables[0].Rows[0]; CtlPelak1.Text = dr["Pelak"].ToString(); FromCarId = dr["CarID"].ToString(); Lbl_RequestTrafficID.Text = dr["RequestTrafficID"].ToString(); lblRequestTrafficName.Text = dr["RequestTrafficName"].ToString(); ds.Dispose(); }
private Int32 GetPrice(int rid) { ClRequestTraffic cl = new ClRequestTraffic(); cl.RequestTrafficID = rid; DataSet ds = RequestTrafficClass.GetListPrice(cl); DataRow dr = ds.Tables[0].Rows[0]; return(Convert.ToInt32(dr["Price"].ToString())); }
public static DataSet RetDs() { ClRequestTraffic cl = new ClRequestTraffic(); cl.Epayorderid = epayorderid; DataSet ds = RequestTrafficClass.GetListManagerep(cl); return(ds); }
protected void BtnDailyReg_Click(object sender, EventArgs e) { if (InputAllDay.Value.ToString() == "undefined") { TerraficPlanBLL.Utility.ShowMsg(Page, ProPertyData.MsgType.warning, "لطفا حداقل یک روز را انتخاب کرده و روی انتخاب روز کلیلک نمایید"); return; } string RepeatTypeValues = getallday(InputAllDay.Value); if (InputAllDay.Value == "0") { TerraficPlanBLL.Utility.ShowMsg(Page, TerraficPlanBLL.ProPertyData.MsgType.warning, "باید حداقل یک روز را انتخاب نمایید"); return; } if (!CtlPelak.MustBeFill) { TerraficPlanBLL.Utility.ShowMsg(Page, TerraficPlanBLL.ProPertyData.MsgType.warning, "وارد کردن پلاک الزامی است"); return; } //if(rbWhithDiscount.Checked && !checkAjance()) //{ // TerraficPlanBLL.Utility.ShowMsg(Page, TerraficPlanBLL.ProPertyData.MsgType.warning, "خودرو وارده در آژانس ثبت نشده است"); // return; //} ClRequestTraffic objreq = new ClRequestTraffic(); objreq.TrackingCode = lblRahCode.Text; objreq.Pelak = CtlPelak.Text; objreq.NationalCode = TXTNationalCode.Text; objreq.Mobile = TXTPersonalMobile.Text; objreq.RepeatTypeID = 3; objreq.RepeatTypeValues = RepeatTypeValues; objreq.OwnerType = 1; objreq.DiscountType = 0; objreq.Firstname = txtFirstName.Text; objreq.LastName = txtLastName.Text; //objreq.PriceRequest = Convert.ToInt32(lblPrice.Attributes["value"]); int carid = RequestTrafficClass.insertNew(objreq); if (carid == 0) { TerraficPlanBLL.Utility.ShowMsg(Page, TerraficPlanBLL.ProPertyData.MsgType.warning, "خطا در ثبت"); } else { Response.Redirect("~/New/RegSucces.aspx?t=1&code=" + lblRahCode.Text); } }
protected void btnLogin_Click(object sender, EventArgs e) { if (txtcode.Value == "" || txtUserName.Value == "") { TerraficPlanBLL.Utility.ShowMsg(Page, ProPertyData.MsgType.warning, "وارد کردن کد رهگیری و کد ملی الزامی است"); return; } string personid = "0"; ClPersonal clperson = new ClPersonal(); clperson.NationalCode = txtUserName.Value; DataSet dsperson = PersonalClass.GetList(clperson); if (dsperson.Tables[0].Rows.Count > 0) { DataRow drperson = dsperson.Tables[0].Rows[0]; personid = drperson["PersonalID"].ToString(); ClRequestTraffic cl = new ClRequestTraffic(); cl.PersonalID = Convert.ToInt32(personid); cl.TrackingCode = txtcode.Value; DataSet ds = RequestTrafficClass.GetList(cl); if (ds.Tables[0].Rows.Count != 0) { DataRow dr = ds.Tables[0].Rows[0]; Session["code"] = dr["TrackingCode"].ToString(); if (Request.QueryString["cp"] == null) { Response.Redirect("~/New/RegSucces.aspx?Code=" + dr["TrackingCode"].ToString()); } else if (Request.QueryString["cp"].ToString() == "100") { Response.Redirect("~/New/cpr.aspx?rid=" + dr["RequestTrafficID"].ToString()); } else { Response.Redirect("~/New/ChangPelak.aspx?Code=" + dr["TrackingCode"].ToString() + "&pid=" + dr["PersonalID"].ToString() + "&rid=" + dr["RequestTrafficID"].ToString()); } } else { TerraficPlanBLL.Utility.ShowMsg(Page, ProPertyData.MsgType.warning, "کد رهگیری اشتباه است"); } } else { TerraficPlanBLL.Utility.ShowMsg(Page, ProPertyData.MsgType.warning, "کد ملی در سامانه موحود نمیباشد"); } }
public static string GetPrice(string pelak, string repid) { ClRequestTraffic cl = new ClRequestTraffic(); cl.Pelak = pelak; cl.RepeatTypeID = Convert.ToInt32(repid); int i = RequestTrafficClass.GetPrice(cl); return(i.ToString()); }
protected void btnInsert_Click(object sender, EventArgs e) { if (FileUpload1.HasFile ) { string Alarm = CSharp.PublicFunction.CheckFile(FileUpload1.PostedFile); if (Alarm != "") { TerraficPlanBLL.Utility.ShowMsg(Page, ProPertyData.MsgType.warning, Alarm); return; } } else if (DDDiscountType.SelectedValue.ToString() != "1009") { TerraficPlanBLL.Utility.ShowMsg(Page, ProPertyData.MsgType.warning, "ارسال مدرک جهت تخفیف الزاامی است"); return; } int t =0; if (rbWhithDiscount.Checked) { ClRequestTraffic cl = new ClRequestTraffic(); cl.RequestTrafficID = Convert.ToInt32( Session["rid"].ToString()); cl.DiscountType = Convert.ToInt32(DDDiscountType.SelectedValue); t= RequestTrafficClass.Update(cl); lblDIscountID.Text = t.ToString(); if ( t== 0) TerraficPlanBLL.Utility.ShowMsg(Page, TerraficPlanBLL.ProPertyData.MsgType.General_Fault, "خطا"); //else //TerraficPlanBLL.Utility.ShowMsg(Page, TerraficPlanBLL.ProPertyData.MsgType.General_Fault, "تخفیف ثبت شد. شهروند گرامی پس از بررسی صحت مدارک تخفیف لحاظ گشته و نتیجه به شما پیامک میگردد"); } ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// if (FileUpload1.HasFile) { string tempPath = System.Configuration.ConfigurationManager.AppSettings["FolderPath"]; string fileName = Path.Combine(Server.MapPath(tempPath), FileUpload1.FileName); ClAttach ClAttach1 = new ClAttach(); ClAttach1.ForTable = "Tbl_RequestTraffic"; ClAttach1.ForID = Convert.ToInt32(t); if (lblOwnerType.Text == "1") ClAttach1.ForCatalogType = 5; else ClAttach1.ForCatalogType = 6; ClAttach1.ForCatalogValue = Convert.ToInt32(DDDiscountType.SelectedValue); ClAttach1.AttachName = FileUpload1.FileName; int iattach = AttachClass.insert(ClAttach1); //save the file to our local path FileUpload1.SaveAs(Path.Combine(Server.MapPath(tempPath), iattach.ToString()) + Path.GetExtension(FileUpload1.FileName)); if (iattach == 0) TerraficPlanBLL.Utility.ShowMsg(Page, TerraficPlanBLL.ProPertyData.MsgType.General_Fault, "خطا در ثبت مدرک"); } ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// BindMadarek(); lbltakhfif.Text = "1"; }
protected void btnSendEmail_Click(object sender, EventArgs e) { if (txtmobile.Value.ToString() == "") { return; } ClRequestTraffic cl = new ClRequestTraffic(); cl.Mobile = txtmobile.Value; cl.RequestStatus = 0; DataSet ds = RequestTrafficClass.GetList(cl); DataView dv = new DataView(ds.Tables[0]); dv.Sort = "RequestTrafficID desc"; string MsgMobile = "کد رهگیری شما:" + Environment.NewLine; int tt = 0; if (ds.Tables[0].Rows.Count > 0) { foreach (DataRowView rowView in dv) { if (tt < 3) { DataRow row = rowView.Row; MsgMobile += " " + row["TrackingCode"].ToString() + Environment.NewLine; tt += 1; } else { break; } } if (TerraficPlan.PublicFunction.SendSMSs(txtmobile.Value, MsgMobile) == 1) { TerraficPlanBLL.Utility.ShowMsg(Page, TerraficPlanBLL.ProPertyData.MsgType.General_Success, "کلمه عبور شما ارسال شد لطفا دقایقی منتظر باشید."); } else { TerraficPlanBLL.Utility.ShowMsg(Page, TerraficPlanBLL.ProPertyData.MsgType.warning, "در ارسال پیامک مشکل ایجاد شده است."); } } else { TerraficPlanBLL.Utility.ShowMsg(Page, TerraficPlanBLL.ProPertyData.MsgType.warning, "شماره همراه در سیستم موجود نمیباشد یا درخواست در حالت انتظار پاسخ از مرکز ندارید"); } }
protected void btnAdd_Click(object sender, EventArgs e) { ClRequestTraffic cl = new ClRequestTraffic(); cl.CarID = Convert.ToInt32(ddCar.SelectedValue); cl.CompanyID = Convert.ToInt32(lblCompanyID.Text); cl.PersonalID = Convert.ToInt32(lblPersonID.Text); cl.YearID = Convert.ToInt32(ddYear.SelectedValue); cl.RepeatTypeID = 6; cl.RepeatTypeValues = ddYear.SelectedValue; cl.SahmID = Convert.ToInt32(ddsahmie.SelectedValue); cl.DiscountType = 1067; //if (DDhagighiOrNot.SelectedValue == "1007" || DDhagighiOrNot.SelectedValue == "1008") //{ cl.OwnerType = 1; cl.CompanyID = null; } //else // cl.OwnerType = 2; //if(DDhagighiOrNot.SelectedValue == "1007") //cl.DarsadJanbazi = Convert.ToInt32(txtDarsadJanbazi.Text); //else if(DDhagighiOrNot.SelectedValue == "1009") //cl.SahmID = Convert.ToInt32(ddsahmie.SelectedValue); if (!correctData()) { return; } int i = RequestTrafficClass.insertGroup(cl); if (i > 0) { BindGrid(); } else if (i == -1) { TerraficPlanBLL.Utility.ShowMsg(Page, ProPertyData.MsgType.warning, "برای این خودرو در این سال تخفیف اعمال شده است"); } else if (i == -100) { TerraficPlanBLL.Utility.ShowMsg(Page, ProPertyData.MsgType.warning, "سقف سهمیه پر شده است."); } else { TerraficPlanBLL.Utility.ShowMsg(Page, ProPertyData.MsgType.warning, "خطا در درج"); } }
public void BindGrid() { ClRequestTraffic cl = new ClRequestTraffic(); cl.Firstname = txtname.Text; cl.LastName = txtLastName.Text; cl.fromDate = DateConvert.sh2m(txtFromDate.Text).ToString(); cl.ToDate = DateConvert.sh2m(txtToDate.Text).ToString(); cl.Pelak = CtlPelak.Text.Length > 5 ? CtlPelak.Text : null; cl.CompanyID = Convert.ToInt32(ddcompany.SelectedValue); cl.MelliCode = nationalCode.Text; cl.DiscountType = Convert.ToInt32(ddDiscountype.SelectedValue); cl.RepeatTypeID = Convert.ToInt32(ddRepeatType.SelectedValue); ////cl.FRomOrderDateStart = DateConvert.sh2m(txtFromDateTransaction.Text).ToString(); ////cl.ToOrderDateStart = DateConvert.sh2m(txtToDateTransaction.Text).ToString(); ////cl.GetConfilict = chGetConfilict.Checked == true ? 1 : 0; if (ddRequestStatus.SelectedValue == "-1") { cl.RequestStatus = null; } else { cl.RequestStatus = Convert.ToInt32(ddRequestStatus.SelectedValue); } DataSet ds = RequestTrafficClass.GetListManage(cl); ds.Tables[0].TableName = "DataSource1"; for (int intCount = 0; intCount < ds.Tables[0].Rows.Count; intCount++) { ds.Tables[0].Rows[intCount]["allRequests"] = RetAllRequestDate(Convert.ToInt32(ds.Tables[0].Rows[intCount]["RequestTrafficID"].ToString())); ds.Tables[0].Rows[intCount]["CreateTime"] = DateConvert.m2sh(ds.Tables[0].Rows[intCount]["MiladyDate"].ToString()) + " " + ds.Tables[0].Rows[intCount]["timeOnly"].ToString(); if (ds.Tables[0].Rows[intCount]["d"].ToString() != "") { ds.Tables[0].Rows[intCount]["d"] = DateConvert.m2sh(ds.Tables[0].Rows[intCount]["d"].ToString()); } } Session["data"] = null; Session["data"] = ds; Response.Redirect("~/Manage/ReportView.aspx?RName=Sale"); //f1.Src="~/Manage/ReportView.aspx?RName=Sale.mrt"; //MyIfarm.Attributes.Add("src", "Manage/ReportView.aspx?RName=Sale.mrt"); //MyIfarm.Visible = true; }
public void BindGrid() { ClRequestTraffic cl = new ClRequestTraffic(); cl.PersonalID = Convert.ToInt32(Session["PersonalID"]); DataSet ds = RequestTrafficClass.GetListCode2(cl); DataView dv = new DataView(ds.Tables[0]); if (ViewState["RequestTraffic"] == null) { ViewState["RequestTraffic"] = "RequestTrafficID Desc"; } dv.Sort = Securenamespace.SecureData.CheckSecurity(ViewState["RequestTraffic"].ToString()).ToString(); GridView1.DataSource = dv; GridView1.DataBind(); }
public void BindGrid() { ClRequestTraffic cl = new ClRequestTraffic(); cl.Firstname = txtname.Text; cl.LastName = txtLastName.Text; cl.fromDate = DateConvert.sh2m(txtFromDate.Text).ToString(); cl.ToDate = DateConvert.sh2m(txtToDate.Text).ToString(); cl.Pelak = CtlPelak.Text.Length > 5 ? CtlPelak.Text : null; cl.CompanyID = Convert.ToInt32(ddcompany.SelectedValue); cl.MelliCode = nationalCode.Text; cl.visitdate = Convert.ToInt32(ddDefauleYear.SelectedValue); if (ddRequestStatus.SelectedValue == "-1") { cl.RequestStatus = null; } else { cl.RequestStatus = Convert.ToInt32(ddRequestStatus.SelectedValue); } if (Convert.ToInt32(ddDefauleYear.SelectedValue) == 0) { DataSet ds = RequestTrafficClass.GetListManage(cl); DataView dv = new DataView(ds.Tables[0]); if (ViewState["RequestTraffic"] == null) { ViewState["RequestTraffic"] = "RequestTrafficID Desc"; } dv.Sort = Securenamespace.SecureData.CheckSecurity(ViewState["RequestTraffic"].ToString()).ToString(); GridView1.DataSource = dv; GridView1.DataBind(); } else { DataSet ds = RequestTrafficClass.GetListManage_inyear(cl); DataView dv = new DataView(ds.Tables[0]); if (ViewState["RequestTraffic"] == null) { ViewState["RequestTraffic"] = "RequestTrafficID Desc"; } dv.Sort = Securenamespace.SecureData.CheckSecurity(ViewState["RequestTraffic"].ToString()).ToString(); GridView1.DataSource = dv; GridView1.DataBind(); } }
private static int UpReqForMojaz(int?reqid, string retmojaz) { ClRequestTraffic cl = new ClRequestTraffic(); cl.RequestTrafficID = reqid; cl.WsMojaz = retmojaz; int i = RequestTrafficClass.Update(cl); if (i > 0) { return(1); } else { return(i); } }
private string FillReport() { ClRequestTraffic cl = new ClRequestTraffic(); cl.TrackingCode = Securenamespace.SecureData.CheckSecurity(Request.QueryString["code"].ToString()); DataSet ds = RequestTrafficClass.GetListCode(cl); DataRow dr = ds.Tables[0].Rows[0]; lbldate.Text = DateConvert.m2sh(DateTime.Now.ToString()).ToString(); lbltime.Text = DateTime.Now.Hour.ToString() + ":" + DateTime.Now.Minute.ToString(); LblMobile.Text = dr["mobile"].ToString(); txtpelak.Text = dr["pelak"].ToString(); lblNationalCode.Text = dr["NationalCode"].ToString(); lblPrice.Text = dr["Price"].ToString(); lblAmount.Text = dr["Price"].ToString(); lblRahgiri.Text = dr["TrackingCode"].ToString(); lblmobileeee.Text = dr["mobile"].ToString(); lblRahgiri.Text = dr["TrackingCode"].ToString(); lblreqtraficID.Text = dr["RequestTrafficID"].ToString(); BindData(); VisiblePay(Convert.ToInt32(dr["RepeateTypeID"].ToString()), Convert.ToInt32(dr["RequestStatus"].ToString()), dr["StatusName"].ToString(), dr["RequestStatusComment"].ToString()); string mobilestr = ""; //if (hoghoghiOrTakhfif) //{ mobilestr = " آقا/خانم " + dr["OwnerName"].ToString() + "مالک خودرو " + dr["CarName"].ToString() + "به شماره پلاک" + dr["pelak"].ToString().Replace("ir", "_") + "متقاضی خرید طرح ترافیک." + Environment.NewLine; mobilestr += "درخواست اولیه شما ثبت گردید و از طریق پیام کوتاه به اطلاع شما خواهد رسید" + Environment.NewLine; mobilestr += "مرکز مدیریت هوشمند ترافیک شهرداری قم"; //} return(mobilestr); }
protected void btnNazar_Click(object sender, EventArgs e) { ClRequestTraffic cl = new ClRequestTraffic(); cl.RequestTrafficID = Convert.ToInt32(txtRequestParam.Value.ToString()); cl.RequestStatus = Convert.ToInt32(ddnazar.SelectedValue); cl.RequestStatusComment = txtnazar.Text; int t = RequestTrafficClass.Update(cl); if (t == 0) { TerraficPlanBLL.Utility.ShowMsg(Page, ProPertyData.MsgType.warning, "ثبت اطلاعات با خطا مواجه شده است"); } else { TerraficPlanBLL.Utility.ShowMsg(Page, ProPertyData.MsgType.General_Success, "نظر مرکز اعمال شد"); } BindGrid(); LightBoxNazar.Value = "1"; }
public string GetUniquCode() { string trancadeCode = ""; int i = 0; DataSet ds = new DataSet(); while (i == 0) { trancadeCode = TerraficPlanBLL.Utility.RandomString(12).ToUpper(); ClRequestTraffic cl = new ClRequestTraffic(); cl.TrackingCode = trancadeCode; ds = RequestTrafficClass.GetList(cl); if (ds.Tables[0].Rows.Count == 0) { i = 1; } } return(trancadeCode); }
private void BindChart() { ClRequestTraffic cl = new ClRequestTraffic(); cl.PersonalID = Convert.ToInt32(Session["PersonalID"]); DataSet ds = RequestTrafficClass.GetListCode2(cl); DataView dv = new DataView(ds.Tables[0]); if (ViewState["RequestTraffic"] == null) { ViewState["RequestTraffic"] = "RequestTrafficID Desc"; } dv.Sort = Securenamespace.SecureData.CheckSecurity(ViewState["RequestTraffic"].ToString()).ToString(); DataTable dt = dv.ToTable(); rpPayy.DataSource = dv;// dt.Rows.Cast<System.Data.DataRow>().Take(10); rpPayy.DataBind(); lblcount.Text = ds.Tables[0].Rows.Count.ToString(); lblcount2.Text = ds.Tables[0].Rows.Count.ToString(); }
private string FillReport(int i) { ClRequestTraffic cl = new ClRequestTraffic(); cl.RequestTrafficID = Convert.ToInt32(Session["rid"].ToString()); DataSet ds = RequestTrafficClass.GetListCode(cl); DataRow dr = ds.Tables[0].Rows[0]; lblcar.Text = dr["CarName"].ToString(); lbldate.Text = DateConvert.m2sh(DateTime.Now.ToString()).ToString(); lbltime.Text = DateTime.Now.Hour.ToString() + ":" + DateTime.Now.Minute.ToString(); lblDiscount.Text = dr["discountName"].ToString(); LblMobile.Text = dr["mobile"].ToString(); txtpelak.Text = dr["pelak"].ToString(); lblNationalCode.Text = dr["NationalCode"].ToString(); lblOwnerName.Text = dr["OwnerName"].ToString(); lblPrice.Text = dr["Price"].ToString(); lblAmount.Text = dr["Price"].ToString(); lblRahgiri.Text = dr["TrackingCode"].ToString(); lblregname.Text = dr["RegName"].ToString(); lblmobileeee.Text = dr["mobile"].ToString(); if (i == 0) { lblRahgiri.Text = dr["TrackingCode"].ToString(); } if (Convert.ToBoolean(dr["HasDiscount"].ToString()) || Convert.ToBoolean(dr["IsHoghoghi"].ToString())) { hoghoghiOrTakhfif = true; } string mobilestr = ""; if (hoghoghiOrTakhfif) { mobilestr = " آقا/خانم " + dr["OwnerName"].ToString() + "مالک خودرو " + dr["CarName"].ToString() + "به شماره پلاک" + dr["pelak"].ToString().Replace("ir", "_") + "متقاضی خرید طرح ترافیک." + Environment.NewLine; mobilestr += "درخواست اولیه شما ثبت گردید و از طریق پیام کوتاه به اطلاع شما خواهد رسید" + Environment.NewLine; mobilestr += "مرکز مدیریت هوشمند ترافیک شهرداری قم"; } return(mobilestr); }
protected void nextlink(object sender, EventArgs e) { if ((Session["CompanyID"] == null || Session["CompanyID"].ToString() == "0" || Session["CompanyID"].ToString() == "") && rd2.Checked) { TerraficPlanBLL.Utility.ShowMsg(Page, TerraficPlanBLL.ProPertyData.MsgType.warning, "کاربر گرامی شما نوع حقوقی را انتخاب کرده اید و باید سازمان مربوطه را ثبت نمایید"); return; } ClRequestTraffic cl = new ClRequestTraffic(); cl.PersonalID = Convert.ToInt32(Session["PersonalID"].ToString()); if (rd2.Checked) { cl.CompanyID = Convert.ToInt32(CtlCompanyOnly1.CompanyID); } int i = RequestTrafficClass.insert(cl); if (i == 0) { TerraficPlanBLL.Utility.ShowMsg(Page, TerraficPlanBLL.ProPertyData.MsgType.General_Fault, "خطا در درج اطلاعات"); } else { if (CtlCompanyOnly1.CompanyID != 0 && rd2.Checked) { Session["CompanyID"] = CtlCompanyOnly1.CompanyID; } else { Session["CompanyID"] = "0"; } // if(Session["rid"] ==null || Session["rid"].ToString() =="" ) Session["rid"] = i.ToString(); Response.Redirect("~/Public/Car.aspx"); } }
public void BindGrid() { ClRequestTraffic cl = new ClRequestTraffic(); cl.PersonalID = Convert.ToInt32(lblPersonID.Text == "0"?null:lblPersonID.Text); if (CtlPelak.MustBeFill) { cl.Pelak = CtlPelak.Text; } DataSet ds = RequestTrafficClass.GetList(cl); DataView dv = new DataView(ds.Tables[0]); if (ViewState["RequestTrafficID"] == null) { ViewState["RequestTrafficID"] = "RequestTrafficID Desc"; } dv.Sort = Securenamespace.SecureData.CheckSecurity(ViewState["RequestTrafficID"].ToString()).ToString(); GridView1.DataSource = dv; GridView1.DataBind(); }
protected void nextlink(object sender, EventArgs e) { ClRequestTraffic cl = new ClRequestTraffic(); cl.PersonalID = Convert.ToInt32(Session["PersonalID"].ToString()); cl.CarID = CtlCar1.SelectedCar; if (cl.CarID == 0) { TerraficPlanBLL.Utility.ShowMsg(Page, TerraficPlanBLL.ProPertyData.MsgType.General_Fault, "ابتدا خوروی انتخابی برای دریافت طرح ترافیک را انتخاب یا ثبت نمایید."); return; } cl.RequestTrafficID = Convert.ToInt32(Session["rid"].ToString()); int i = RequestTrafficClass.Update(cl); if (i == 0) { TerraficPlanBLL.Utility.ShowMsg(Page, TerraficPlanBLL.ProPertyData.MsgType.General_Fault, "خطا در درج اطلاعات"); } else { Response.Redirect("~/Public/Discount.aspx"); } }
public void BindGrid() { ClRequestTraffic cl = new ClRequestTraffic(); // cl.PersonalID = Convert.ToInt32(Session["PersonalID"]); cl.Firstname = txtname.Text; cl.LastName = txtLastName.Text; cl.fromDate = DateConvert.sh2m(txtFromDate.Text).ToString(); cl.ToDate = DateConvert.sh2m(txtToDate.Text).ToString(); cl.Pelak = CtlPelak.Text.Length > 5 ? CtlPelak.Text : null; DataSet ds = RequestTrafficClass.GetListManage(cl); DataView dv = new DataView(ds.Tables[0]); if (ViewState["RequestTraffic"] == null) { ViewState["RequestTraffic"] = "RequestTrafficID Desc"; } dv.Sort = Securenamespace.SecureData.CheckSecurity(ViewState["RequestTraffic"].ToString()).ToString(); GridView1.DataSource = dv; GridView1.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { var liActive = (HtmlGenericControl)Master.FindControl("step1"); liActive.Attributes.Add("class", "complete"); var liActive2 = (HtmlGenericControl)Master.FindControl("step2"); liActive2.Attributes.Add("class", "complete"); var liActive3 = (HtmlGenericControl)Master.FindControl("step3"); liActive3.Attributes.Add("class", "complete"); var liActive4 = (HtmlGenericControl)Master.FindControl("step4"); liActive4.Attributes.Add("class", "complete"); var liActive5 = (HtmlGenericControl)Master.FindControl("step5"); liActive5.Attributes.Add("class", "active"); if (Securenamespace.SecureData.CheckSecurity(Request.QueryString["takhfif"].ToString()) == "1") { fdiscount.Visible = true; lblresid.Text = "رسید ثبت نام"; } else { fWhithoutDiscount.Visible = true; lblresid.Text = "رسید پرداخت"; } if (!Page.IsPostBack) { txtpelak.Enable = false; ClRequestTraffic cl1 = new ClRequestTraffic(); cl1.RequestTrafficID = Convert.ToInt32(Session["rid"].ToString()); DataSet ds = RequestTrafficClass.GetList(cl1); DataRow dr = ds.Tables[0].Rows[0]; if (dr["TrackingCode"].ToString().Length > 2)//second time { FillReport(0); return; } string trancadeCode = GetUniquCode(); string mobilesmg = ""; mobilesmg = FillReport(1); lblRahgiri.Text = trancadeCode; try { if (!hoghoghiOrTakhfif) { mobilesmg = "کد رهگیری شما " + Environment.NewLine + trancadeCode.ToString() + Environment.NewLine + "میباشد." + Environment.NewLine + "مرکز مدیریت هوشمند ترافیک شهرداری قم "; } PublicFunction.SendSMSs(lblmobileeee.Text, mobilesmg); } catch { } ClRequestTraffic cl = new ClRequestTraffic(); cl.RequestTrafficID = Convert.ToInt32(Session["rid"]); cl.TrackingCode = trancadeCode; RequestTrafficClass.Update(cl); } }
public static string RegWSmojazOneReq(int?reqid = 0, double epayid = 0) { string alarm = ""; if (reqid == 0) { reqid = GetReqidFromEpayID(Convert.ToInt32(epayid)); } if (reqid <= 0) { alarm = "خطا در گرفتن شماره تراکنش"; return(""); } string pelak = ""; byte pelak_type; byte plan_type; byte off_type; string familyName; int mobile_num; string start_time; string end_time; int rial; string stations; string retvalue; int c = 0; int i = 0; ClRequestTraffic cl = new ClRequestTraffic(); cl.RequestTrafficID = reqid; string Tempretval = ""; DataSet ds = RequestTrafficClass.GetListWS(cl); for (i = 0; i < ds.Tables[0].Rows.Count; i++) { DataRow dr = ds.Tables[0].Rows[i]; pelak = dr["pelak"].ToString(); pelak_type = Convert.ToByte(dr["pelak_type"].ToString()); plan_type = Convert.ToByte(dr["plan_type"].ToString() == "" ? "0" : dr["plan_type"].ToString()); off_type = Convert.ToByte(dr["off_type"].ToString());//Convert.ToByte(0); familyName = dr["familyName"].ToString(); mobile_num = Convert.ToInt32(dr["mobile_num"].ToString()); start_time = dr["start_time"].ToString(); //"2015-06-09";// end_time = dr["end_time"].ToString(); //"2015-06-10"; rial = Convert.ToInt32(dr["rial"].ToString()); stations = "141101,141251,141351,141451,141501,141601,141301,141102,141201"; // dr["stations"].ToString();// "0"; //try //{ // TerraficPlan.WSmojaz.Service1 WSmojaz = new TerraficPlan.WSmojaz.Service1(); TerraficPlan.Mojaz2.Service1 WSmojaz = new TerraficPlan.Mojaz2.Service1(); string retval = WSmojaz.add_mojaz("user1", "user*11", pelak, pelak_type, plan_type, off_type, familyName, mobile_num, start_time, end_time, rial, stations); Tempretval += retval + ","; if (Convert.ToInt32(retval) > 0) { alarm += ""; c += 1; //Tempretval += retval + ","; } else { alarm += "خطا در اتصال به سامانه محدوده طرح ترافیک"; } //} //catch //{ // alarm += "خطا در اتصال به سامانه محدوده طرح ترافیک"; //} }//end for if (i != c) { alarm += "خطا در ثیت مجوز در بانک"; } UpReqForMojaz(reqid, Tempretval); return(alarm); }
//protected void BB() { // //ReportViewer1.ServerReport.ReportServerUrl = new Uri(ConfigurationManager.AppSettings["ReportServer"].ToString()); // //ReportViewer1.ServerReport.ReportPath = "/Terrafical/Terrafical2"; // IReportServerCredentials irsc = new CustomReportCredentials(ConfigurationManager.AppSettings["ReportUser"], ConfigurationManager.AppSettings["ReportUserPass"], ConfigurationManager.AppSettings["Domain"]); // ReportViewer1.ServerReport.ReportServerCredentials = irsc; // ReportViewer1.ProcessingMode = ProcessingMode.Remote; // ReportViewer1.Visible = true; // ReportViewer1.ServerReport.ReportServerUrl = new Uri(ConfigurationManager.AppSettings["ReportServer"]); // ReportViewer1.ServerReport.ReportPath = "/Terrafical/Terrafical2.rdlc"; // ReportParameter fromdate =new ReportParameter(); // fromdate.Name = "FromDate"; // fromdate.Values.Add(DateConvert.sh2m(txtFromDate.Text).ToString()); //ReportParameter ToDate = new ReportParameter(); //ToDate.Name = "ToDate"; //ToDate.Values.Add(DateConvert.sh2m(txtToDate.Text).ToString()); //ReportParameter[] parameters = { fromdate, ToDate }; //ReportViewer1.ServerReport.SetParameters(parameters); // ReportViewer1.DataBind(); //} protected void btn1_Click(object sender, EventArgs e) { ClRequestTraffic c = new ClRequestTraffic(); c.fromDate = DateConvert.sh2m(txtFromDate.Text).ToString(); c.ToDate = DateConvert.sh2m(txtToDate.Text).ToString(); DataSet ds = TrafficPlanDAL.RequestTrafficClass.GetListCodeManagee(c); // Variables declaration string filename = "Terrafical.xls"; DataSet dsExport = new DataSet(); System.IO.StringWriter tw = new System.IO.StringWriter(); System.Web.UI.HtmlTextWriter hw = new System.Web.UI.HtmlTextWriter(tw); DataGrid dgGrid = new DataGrid(); dgGrid.DataSource = ds; // Report Header hw.WriteLine("<b><u><font size='5'> " + "درخواست های ثبت شده" + "</font></u></b>"); // Get the HTML for the control. dgGrid.HeaderStyle.Font.Bold = true; dgGrid.DataBind(); dgGrid.RenderControl(hw); ////Set App //if (app == "Word") { // app = "application/vnd.word;"; // filename = filename + ".doc"; //} else { // app = "application/vnd.ms-excel"; // filename = filename + ".xls"; //} // Write the HTML back to the browser. HttpContext.Current.Response.ContentType = "application/vnd.ms-excel"; //EnableViewState = False HttpContext.Current.Response.Clear(); HttpContext.Current.Response.BufferOutput = true; HttpContext.Current.Response.ContentEncoding = System.Text.Encoding.UTF8; HttpContext.Current.Response.Charset = "UTF-8"; HttpContext.Current.Response.AddHeader("content-disposition", "attachment;filename=" + filename); HttpContext.Current.Response.Write(tw.ToString()); HttpContext.Current.Response.End(); //DataTable dt = ds.Tables[0]; // string attachment = "attachment; filename=city.xls"; // Response.ClearContent(); // Response.AddHeader("content-disposition", attachment); // Response.ContentType = "application/vnd.ms-excel"; // string tab = ""; // foreach (DataColumn dc in dt.Columns) // { // Response.Write(tab + dc.ColumnName); // tab = "\t"; // } // Response.Write("\n"); // int i; // foreach (DataRow dr in dt.Rows) // { // tab = ""; // for (i = 0; i < dt.Columns.Count; i++) // { // Response.Write(tab + Encoding.UTF8.GetString(Encoding.UTF8.GetBytes(dr[i].ToString()))); // tab = "\t"; // } // Response.Write("\n"); // } // Response.End(); }
protected void btnAddRequest_Click(object sender, EventArgs e) { string RepeatTypeValues = ""; if (lblREpeatTypeID.Text == "6") { trYear.Visible = true; RepeatTypeValues = ddYear.SelectedValue; isSakenSelected.Visible = true; ts.Visible = true; } else if (lblREpeatTypeID.Text == "4") { TrMonth.Visible = true; RepeatTypeValues = GetMonth(); } else if (lblREpeatTypeID.Text == "5") { Trseason.Visible = true; RepeatTypeValues = GetSeason(); } if (RepeatTypeValues == "") { TerraficPlanBLL.Utility.ShowMsg(Page, TerraficPlanBLL.ProPertyData.MsgType.warning, "باید طرح را انتخاب نمایید"); return; } if (!CtlPelak.MustBeFill) { TerraficPlanBLL.Utility.ShowMsg(Page, TerraficPlanBLL.ProPertyData.MsgType.warning, "وارد کردن پلاک الزامی است"); return; } //if (rbWhithDiscount.Checked && !checkAjance()) //{ // TerraficPlanBLL.Utility.ShowMsg(Page, TerraficPlanBLL.ProPertyData.MsgType.warning, "خودرو وارده در آژانس ثبت نشده است"); // return; //} ClRequestTraffic objreq = new ClRequestTraffic(); objreq.TrackingCode = lblRahCode.Text; objreq.Pelak = CtlPelak.Text; objreq.ModelCar = DDCarModel.Text; objreq.NationalCode = TXTNationalCode.Text; objreq.Mobile = TXTPersonalMobile.Text; objreq.RepeatTypeID = Convert.ToInt32(lblREpeatTypeID.Text); objreq.RepeatTypeValues = RepeatTypeValues; objreq.OwnerType = 1; objreq.Firstname = txtFirstName.Text; objreq.LastName = txtLastName.Text; objreq.Adress = txtAdress.Text; objreq.CodePosti = txtPostiCode.Text; if (isSakenSelected.Checked) { objreq.PersonalType = 2; } else if (isSakenSelected2.Checked) { objreq.PersonalType = 1; } else { objreq.PersonalType = 0; } //objreq.DiscountType = Disscount; if (isSakenSelected2.Checked) { objreq.DiscountType = 1007; } if (isSakenSelected.Checked) { objreq.DiscountType = 1008; } int carid = RequestTrafficClass.insertNew(objreq); if (carid == 0) { TerraficPlanBLL.Utility.ShowMsg(Page, TerraficPlanBLL.ProPertyData.MsgType.warning, "خطا در ثبت"); } else { try { if (FileUploadCard.HasFile) { string Alarm = CSharp.PublicFunction.CheckFile(FileUploadCard.PostedFile); if (Alarm != "") { TerraficPlanBLL.Utility.ShowMsg(Page, ProPertyData.MsgType.warning, Alarm); return; } } else { TerraficPlanBLL.Utility.ShowMsg(Page, ProPertyData.MsgType.warning, "ارسال کارت خودرو الزاامی است"); return; } if (FileUploadFani.HasFile) { string Alarm = CSharp.PublicFunction.CheckFile(FileUploadFani.PostedFile); if (Alarm != "") { TerraficPlanBLL.Utility.ShowMsg(Page, ProPertyData.MsgType.warning, Alarm); return; } } else if ( (DateTime.Now.Year - Convert.ToInt32(DateConvert.sh2m(DDCarModel.Text + "/01/01").Year) > 6 && rdSahmsi.Checked) || (DateTime.Now.Year - Convert.ToInt32(Convert.ToDateTime(DDCarModel.Text + "/01/01").Year) > 6 && rdmilady.Checked) ) { TerraficPlanBLL.Utility.ShowMsg(Page, ProPertyData.MsgType.warning, "ارسال کارت معاینه فنی برای خودروهای زیر 5 سال الزاامی است"); return; } Uploadmadarek(carid); if (isSakenSelected.Checked) { UploadmadarekSaken(carid); } else if (isSakenSelected2.Checked) { Uploadmadarekjanbaz(carid); } //LightBox.Value = "1"; Response.Redirect("~/New/RegSucces.aspx?code=" + lblRahCode.Text); } catch (Exception ex) { TerraficPlanBLL.Utility.ShowMsg(Page, ProPertyData.MsgType.warning, "خطا در ارسال مدارک به سرور"); } //lblRahCode.Text = PublicFunction.GetUniquCode(); } }