コード例 #1
0
 private void BindData()
 {
     AspNetPager1.RecordCount = Convert.ToInt32(ADOHelp.GetSingle("proc_BackSearchTeacherInfoCount '" + TextBox1.Text + "' "));
     Repeater1.DataSource     = ADOHelp.QueryDataTable("exec proc_BackSearchTeacherInfo " + AspNetPager1.PageSize + "," + AspNetPager1.CurrentPageIndex + ",'" + TextBox1.Text + "'");
     Repeater1.DataBind();
 }
コード例 #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     Repeater1.DataSource = SqlDataSource1;
     Repeater1.DataBind();
 }
コード例 #3
0
        private void PrintInvoice(String HeadIdno)
        {
            InvoiceDAL obj      = new InvoiceDAL();
            Int64      inv      = Convert.ToInt64(HeadIdno);
            Int64      chlnidno = obj.ChlnIdno(ApplicationFunction.ConnectionString(), inv);
            String     chln     = Convert.ToString(chlnidno);

            String CityName = Session["fromcity"] as string;

            dttemp = obj.city(ApplicationFunction.ConnectionString(), CityName);


            string  CompName = ""; string Add1 = "", Add2 = ""; string PhNo = ""; string City = ""; string State = ""; string PanNo; string TinNo = ""; string FaxNo = "";
            string  GSTIN    = "";
            DataSet CompDetl = SqlHelper.ExecuteDataset(ApplicationFunction.ConnectionString(), CommandType.Text, "select * from tblcompmast A Left JOIN tblCITYMASTER CM On CM.city_idno=A.city_idno Left join tblStateMaster SM ON SM.state_idno=A.state_idno");
            DataSet dsReport = SqlHelper.ExecuteDataset(ApplicationFunction.ConnectionString(), CommandType.Text, "EXEC [spInvGen] @ACTION='SelectPrint1',@Id='" + HeadIdno + "'");
            DataSet TOLLinfo = SqlHelper.ExecuteDataset(ApplicationFunction.ConnectionString(), CommandType.Text, "EXEC [spInvGen] @ACTION='TOLLINFO',@Id='" + chln + "'");

            CompName         = Convert.ToString(CompDetl.Tables[0].Rows[0]["Comp_Name"]);
            Add1             = Convert.ToString(CompDetl.Tables[0].Rows[0]["Adress1"]);
            Add2             = Convert.ToString(dttemp.Rows[0]["Address1"]) + "," + Convert.ToString(dttemp.Rows[0]["Address2"]);
            PhNo             = Convert.ToString(CompDetl.Tables[0].Rows[0]["Phone_Off"] + "," + CompDetl.Tables[0].Rows[0]["Mobile_1"]);
            City             = Convert.ToString(CompDetl.Tables[0].Rows[0]["City_Name"]);
            State            = Convert.ToString(CompDetl.Tables[0].Rows[0]["State_Name"]) + "(CODE :-  " + Convert.ToString(dsReport.Tables[0].Rows[0]["GSTState_Code"]) + ")";
            TinNo            = Convert.ToString(CompDetl.Tables[0].Rows[0]["TIN_NO"]);
            FaxNo            = Convert.ToString(CompDetl.Tables[0].Rows[0]["Fax_No"]);
            PanNo            = Convert.ToString(CompDetl.Tables[0].Rows[0]["Pan_No"]);
            GSTIN            = Convert.ToString(CompDetl.Tables[0].Rows[0]["CompGSTIN_No"]);
            lblpin.Text      = Convert.ToString(CompDetl.Tables[0].Rows[0]["Pin_No"]);
            lblCompname.Text = CompName; //lblcomp.Text = "For - " + CompName;
            lblCompAdd1.Text = Add1;

            lbladd2.Text   = Add2;
            lblcity.Text   = City;
            lblstate.Text  = State;
            lblmobile.Text = PhNo;
            lblgstin.Text  = GSTIN;
            lblpan.Text    = PanNo.ToString();
            if (dsReport != null && dsReport.Tables[1].Rows.Count > 0)
            {
                Repeater1.DataSource = dsReport.Tables[1];
                Repeater1.DataBind();
            }
            if (TOLLinfo != null)
            {
                Repeater2.DataSource = TOLLinfo.Tables[0];
                Repeater2.DataBind();
            }
            lblunit.Text     = Convert.ToString(dsReport.Tables[0].Rows[0]["unit"]);
            lblbillno.Text   = Convert.ToString(dsReport.Tables[0].Rows[0]["Inv_No"]);
            lblbilldate.Text = Convert.ToDateTime(dsReport.Tables[0].Rows[0]["Inv_Date"]).ToString("dd-MM-yyyy");
            lblcontname.Text = Convert.ToString(dsReport.Tables[0].Rows[0]["Party_Name"]);
            lbladd1.Text     = Convert.ToString(dsReport.Tables[0].Rows[0]["Address1"]);
            lblcadd2.Text    = Convert.ToString(dsReport.Tables[0].Rows[0]["Address2"]);
            lblcity1.Text    = Convert.ToString(dsReport.Tables[0].Rows[0]["City_Name"]);
            lblst.Text       = Convert.ToString(dsReport.Tables[0].Rows[0]["State_Name"]);
            lblgst.Text      = Convert.ToString(dsReport.Tables[0].Rows[0]["Party_GSTINNo"]);
            Double T1 = Convert.ToDouble(lbltotal.Text);
            Double T2 = Convert.ToDouble(lbltot.Text);

            lblgrandtotal.Text = Convert.ToString((T1 + T2));
        }
コード例 #4
0
ファイル: DocViewer.aspx.cs プロジェクト: dharm9594/asas
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    if (!string.IsNullOrEmpty(Convert.ToString(Request.QueryString["FileID"])))
                    {
                        int FIleID = Convert.ToInt16(Convert.ToString(Request.QueryString["FileID"]));
                        ModelProtal_File_Image_Convert file = new ModelProtal_File_Image_Convert();
                        file.FileID = FIleID;
                        DataTable dt = file.GetFileDataByFileID();
                        Repeater1.DataSource = dt;
                        Repeater1.DataBind();
                        Repeater2.DataSource = dt;
                        Repeater2.DataBind();
                    }
                    //else if (!string.IsNullOrEmpty(Convert.ToString(Request.QueryString["PricingCartID"])))
                    //{
                    //    int PricingCartID = Convert.ToInt16(Convert.ToString(Request.QueryString["PricingCartID"]));
                    //    ModelPricing pricingCart = new ModelPricing();
                    //    string NTID = Convert.ToString(Session["PP_NTID"]);
                    //    DataTable dtPricingCart = pricingCart.getPricingCart(NTID);

                    //    Response.Clear();
                    //    Response.Buffer = true;
                    //    Response.AddHeader("content-disposition", "attachment;filename=I_PricingData.xls");
                    //    Response.Charset = "";
                    //    Response.ContentType = "application/vnd.ms-excel";
                    //    using (StringWriter sw = new StringWriter())
                    //    {
                    //        HtmlTextWriter hw = new HtmlTextWriter(sw);

                    //        //To Export all pages
                    //        GridView gv = new GridView();
                    //        gv.DataSource = dtPricingCart;
                    //        gv.DataBind();

                    //        gv.AllowPaging = false;


                    //        gv.HeaderRow.BackColor = Color.White;
                    //        foreach (TableCell cell in gv.HeaderRow.Cells)
                    //        {
                    //            cell.BackColor = gv.HeaderStyle.BackColor;
                    //        }
                    //        foreach (GridViewRow row in gv.Rows)
                    //        {
                    //            row.BackColor = Color.White;
                    //            foreach (TableCell cell in row.Cells)
                    //            {
                    //                if (row.RowIndex % 2 == 0)
                    //                {
                    //                    cell.BackColor = gv.AlternatingRowStyle.BackColor;
                    //                }
                    //                else
                    //                {
                    //                    cell.BackColor = gv.RowStyle.BackColor;
                    //                }
                    //                cell.CssClass = "textmode";
                    //            }
                    //        }

                    //        gv.RenderControl(hw);

                    //        //style to format numbers to string
                    //        string style = @"<style> .textmode { } </style>";
                    //        Response.Write(style);
                    //        Response.Output.Write(sw.ToString());
                    //        Response.Flush();
                    //        Response.End();
                    //    }
                    //}
                }
            }
            catch (Exception Ex)
            {
                Utility.MessageBox("Error Occurred !!! Please contact system administrator.");
                Utility.CreateErrorLog(Ex.Message.ToString(), "DocViewer.aspx", "Page_Load", "../ErrorLog/");
            }
        }
コード例 #5
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            try
            {
                if (!Page.IsPostBack)
                {
                    string quer = @"Select top 10
                                      querystring, COUNT(queryString) as CountValue
	                                  from  [Search_Service_Application_1_LinksStoreDB_85b9e99e32794b6c9785675b4fb6757f].[dbo].[MSSQLogPageImpressionQuery]
	                                  where queryString !='' 
			                                and queryString IS NOT NULL 
			                                and queryString not like 'path:\""http://%' 
			                                and queryString not like 'path:\""https://%' 
			                                and queryString not like 'siteid:%'  
	                                  group by queryString
                                      order by CountValue desc";
                    HVE.Files.dbConnection conn = new HVE.Files.dbConnection();
                    DataTable tempTabale        = null;
                    tempTabale = conn.executeSelectNoParameter(quer);
                    //GridView1.DataSource = tempTabale;
                    //GridView1.DataBind();
                    //foreach (DataRow row in tempTabale.Rows) {}

                    string        linkVal = @"http://aespaspsas/sites/HVEDevSite/_layouts/15/osssearchresults.aspx?u=http%3A%2F%2Faespaspsas%2Fsites%2FHVEDevSite&k=";
                    StringBuilder htmlStr = new StringBuilder("This is string builder");

                    for (int i = 0; i < tempTabale.Rows.Count; i++)
                    {
                        switch (i)
                        {
                        case 0:
                            htmlStr.Append("<p><font size='7'>" + tempTabale.Rows[i][0] + "</font>");
                            //htmlStr.Append(@"<a href='<%#Eval(\""tempTabale.Rows[i][0]\"")%>' target='_blank'>Visit W3Schools</a>");

                            //htmlStr.Append("<p><font size='7'>" + tempTabale.Rows[i][0] + "</font></p>");
                            htmlStr.Append("&nbsp");
                            break;

                        case 1:
                            htmlStr.Append("<font size='7'>" + tempTabale.Rows[i][0] + "</font>");
                            htmlStr.Append("&nbsp");
                            break;

                        case 2:
                            htmlStr.Append("<font size='6'>" + tempTabale.Rows[i][0] + "</font>");
                            htmlStr.Append("&nbsp");
                            break;

                        case 3:
                            htmlStr.Append("<font size='6'>" + tempTabale.Rows[i][0] + "</font>");
                            htmlStr.Append("&nbsp");
                            break;

                        case 4:
                            htmlStr.Append("<font size='6'>" + tempTabale.Rows[i][0] + "</font>");
                            htmlStr.Append("&nbsp");
                            break;

                        case 5:
                            htmlStr.Append("<font size='5'>" + tempTabale.Rows[i][0] + "</font>");
                            htmlStr.Append("&nbsp");
                            break;

                        case 6:
                            htmlStr.Append("<font size='5'>" + tempTabale.Rows[i][0] + "</font>");
                            htmlStr.Append("&nbsp");
                            break;

                        case 7:
                            htmlStr.Append("<font size='5'>" + tempTabale.Rows[i][0] + "</font>");
                            htmlStr.Append("&nbsp");
                            break;

                        case 8:
                            htmlStr.Append("<font size='4'>" + tempTabale.Rows[i][0] + "</font>");
                            htmlStr.Append("&nbsp");
                            break;

                        case 9:
                            htmlStr.Append("<font size='4'>" + tempTabale.Rows[i][0] + "</font></p>");
                            htmlStr.Append("&nbsp");
                            break;

                        //              case 10:
                        //                  htmlStr.Append("<p><font size='4'>" + tempTabale.Rows[i][0] + "</font></p>");
                        ////                  htmlStr.Append("&nbsp");
                        //                  break;
                        default:
                            Console.WriteLine("Default case");
                            break;
                        }
                    }
                    LiteralText.Text     = htmlStr.ToString();
                    Repeater1.DataSource = tempTabale;
                    Repeater1.DataBind();
                }
            }
            catch (System.Exception excep)
            {
                Label1.Text += excep.Message;
            }
        }
コード例 #6
0
ファイル: Project.aspx.cs プロジェクト: Merdemg/WebPortfolio
 void SetImages(List <string> list)
 {
     Repeater1.DataSource = list;
     Repeater1.DataBind();
 }
コード例 #7
0
        protected void GridView3_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            int rowIndex = Convert.ToInt32(e.CommandArgument);

            GridViewRow row = GridView3.Rows[rowIndex];

            Session["Row_Gridview_for_TakeOver"] = row;


            if (e.CommandName == "SelectCH")
            {
                if (Convert.ToInt16(row.Cells[25].Text) == 0)
                {
                    if (Convert.ToInt16(row.Cells[17].Text) == 0 || string.IsNullOrEmpty(row.Cells[17].Text as string) || FINANCIAL_MANAGEMENT.App_Code.xrisi.Fetch_User_Abe_Kinisis_Wait(row.Cells[20].Text) != TextBox126.Text)
                    {
                        if (FINANCIAL_MANAGEMENT.App_Code.xrisi.Fetch_User_Abe_Kinisis_Wait(row.Cells[20].Text) != TextBox126.Text)
                        {
                            GridView3.DataBind();
                            Label4.Text = "Ο/Η <b>" + row.Cells[13].Text + "</b> Διεκπεραιώνεται από τον χειριστή <b>" + FINANCIAL_MANAGEMENT.App_Code.xrisi.Fetch_User_Abe_Kinisis_Wait(row.Cells[20].Text) + "</b>. Αλλαγή χειριστή  !";
                            ModalPopupExtender4.Show();
                        }
                        else
                        {
                            Label2.Text = "Ο/Η " + " <b>" + row.Cells[13].Text + " </b>" + " θα διεκπεραιωθεί από τον " + User.Identity.Name;
                            Session["Index_select_row_for_TakeOver"] = GridView3.SelectedIndex;
                            TextBox135.Text = row.Cells[20].Text;
                            ModalPopupExtender1.Show();
                            Repeater1.DataBind();
                        }
                    }
                    else



                    if (Convert.ToInt16(row.Cells[17].Text) == 1)
                    {
                        TextBox133.Text = "2";
                        ABE_KINISI_FILL.Update();
                        Session["ID_Pers_Check_Proj"] = row.Cells[20].Text;

                        ScriptManager.RegisterStartupScript(this, typeof(string), "OPEN_WINDOW", "var Mleft = (screen.width/2)-(690/2);var Mtop = (screen.height-500)/2;window.open( 'PersonalDataKiosk.aspx', null, 'height=770,width=1200,directories=no,titlebar=no,status=no,toolbar=no,scrollbars=no,menubar=no,location=no, left=\'+Mleft+\'' );", true);
                        Session["Update_ABE_WAIT_Schedule"] = "1";
                        GridView3.DataBind();
                        GridView3.SelectedIndex = -1;
                    }
                    else if (Convert.ToInt16(row.Cells[17].Text) == 2)
                    {
                        TextBox133.Text = "2";
                        ABE_KINISI_FILL.Update();
                        Session["ID_Pers_Check_Proj"] = row.Cells[20].Text;

                        ScriptManager.RegisterStartupScript(this, typeof(string), "OPEN_WINDOW", "var Mleft = (screen.width/2)-(690/2);var Mtop = (screen.height-500)/2;window.open( 'PersonalDataKiosk.aspx', null, 'height=770,width=1200,directories=no,titlebar=no,status=no,toolbar=no,scrollbars=no,menubar=no,location=no, left=\'+Mleft+\'' );", true);


                        Session["Update_ABE_WAIT_Schedule"] = "1";


                        GridView3.SelectedIndex = -1;
                    }
                    else if (Convert.ToInt16(row.Cells[17].Text) == 3)


                    {
                        Label3.Text     = "Δεν έχει εκδοθεί Αριθμός ΑΒΕ, Αναμονή Πληρωμής <br />" + " Επεξεργασία ;";
                        TextBox135.Text = row.Cells[20].Text;
                        ModalPopupExtender2.Show();
                    }
                }
                else
                {
                    if (Convert.ToInt16(row.Cells[18].Text) == 6)
                    {
                        Session["Visa_Ait_K"] = "101";
                        Session["Visa_ID_K"]  = row.Cells[16].Text;

                        Session["Name_Ensima_V"]    = row.Cells[13].Text;
                        Session["Praxi_Ensima_V"]   = row.Cells[9].Text + ",  " + row.Cells[10].Text;
                        Session["ID_Ensima_V"]      = row.Cells[25].Text;
                        Session["Poso_Ensima_V"]    = row.Cells[6].Text;
                        Session["Poso_Ensima_LC_V"] = row.Cells[7].Text;
                        Session["Etos_Esnima_V"]    = row.Cells[14].Text;
                        Session["Status_Cur_V"]     = row.Cells[17].Text;
                        Session["Date_Ensima"]      = row.Cells[8].Text;
                        ScriptManager.RegisterStartupScript(this, typeof(string), "OPEN_WINDOW", "var Mleft = (screen.width/2)-(690/2);var Mtop = (screen.height-500)/2;window.open( 'Visa_Status.aspx', null, 'height=220,width=690,directories=no,titlebar=no,status=no,toolbar=no,scrollbars=no,menubar=no,location=no, left=\'+Mleft+\'' );", true);
                        GridView3.SelectedIndex = -1;
                        // Response.Redirect("VISA_Print_Kiosk.aspx");



                        ABE_KINISI_FILL.DataBind();
                        GridView3.DataBind();
                    }
                    else
                    {
                        if (Convert.ToDecimal(row.Cells[6].Text) > 300)
                        {
                            ScriptManager.RegisterClientScriptBlock(this, this.GetType(),
                                                                    "alertMessage",
                                                                    "alert('Γραμμάτιο Είσπραξης : " + row.Cells[25].Text + " από " + row.Cells[8].Text + "  ');", true);
                            ABE_KINISI_FILL.DataBind();
                            GridView3.DataBind();
                        }
                        else
                        {
                            Session["Name_Ensima"]    = row.Cells[13].Text;
                            Session["Praxi_Ensima"]   = row.Cells[9].Text + ",  " + row.Cells[10].Text;
                            Session["ID_Ensima"]      = row.Cells[25].Text;
                            Session["Poso_Ensima"]    = row.Cells[6].Text;
                            Session["Poso_Ensima_LC"] = row.Cells[7].Text;
                            Session["Etos_Esnima"]    = row.Cells[14].Text;
                            Session["Status_Cur"]     = row.Cells[17].Text;
                            Session["Date_Ensima"]    = row.Cells[8].Text;
                            ScriptManager.RegisterStartupScript(this, typeof(string), "OPEN_WINDOW", "var Mleft = (screen.width/2)-(690/2);var Mtop = (screen.height-500)/2;window.open( 'Tameio/Ensima_Number_T.aspx', null, 'height=290,width=680,directories=no,titlebar=no,status=no,toolbar=no,scrollbars=no,menubar=no,location=no, left=\'+Mleft+\'' );", true);
                            GridView3.SelectedIndex = -1;



                            ABE_KINISI_FILL.DataBind();
                            GridView3.DataBind();
                        }
                    }
                }
            }
            else if (e.CommandName == "Document")
            {
                //     GridView3.SelectedIndex = -1;

                Session["ID_Ensima_K"]       = row.Cells[25].Text;
                Session["Etos_Esnima_K"]     = row.Cells[14].Text;
                Session["ID_Files_ABE"]      = row.Cells[23].Text;
                Session["ABE_VISA_FET_Pics"] = row.Cells[24].Text;

                TextBox131.Text = (string)Session["ID_Ensima_K"];


                //    var chk = (System.Web.UI.WebControls.CheckBox)(row.Cells[13].FindControl("O_C_CHECK"));
                //     CheckBox chk = (CheckBox)row.FindControl("O_C_CHECK");
                //      if (chk != null && chk.Checked)
                if (row.Cells[22].Text == "0")
                {
                    ScriptManager.RegisterStartupScript(this, typeof(string), "OPEN_WINDOW", "var Mleft = (screen.width/2)-(760/2);var Mtop = (screen.height/2)-(700/2);window.open( '../Diaxeirisi/Files_For_ABE.aspx', null, 'height=280,width=690,status=no,toolbar=no,scrollbars=no,menubar=no,location=no, left=\'+Mleft+\'' );", true);
                    TextBox131.Text = null;
                }
                else
                {
                    int cc = Convert.ToInt32(row.Cells[23].Text);
                    Response.Redirect("~/Diaxeirisi/DownloadFile.ashx?yourVariable=" + cc);
                }
            }
            else if (e.CommandName == "SelectCHDESC")
            {
                if (Convert.ToInt16(row.Cells[17].Text) == 0 || string.IsNullOrEmpty(row.Cells[17].Text as string) || (FINANCIAL_MANAGEMENT.App_Code.xrisi.Fetch_User_Abe_Kinisis_Wait(row.Cells[20].Text) != TextBox126.Text && Convert.ToInt32(row.Cells[17].Text) < 4))
                {
                    if (row.Cells[11].Text != "&nbsp;" && FINANCIAL_MANAGEMENT.App_Code.xrisi.Fetch_User_Abe_Kinisis_Wait(row.Cells[20].Text) != TextBox126.Text && Convert.ToInt32(row.Cells[17].Text) < 4)
                    {
                        GridView3.DataBind();
                        Label4.Text = "Ο/Η <b>" + row.Cells[13].Text + "</b> Διεκπεραιώνεται από τον χειριστή <b>" + FINANCIAL_MANAGEMENT.App_Code.xrisi.Fetch_User_Abe_Kinisis_Wait(row.Cells[20].Text) + "</b>. Αλλαγή χειριστή  !";
                        ModalPopupExtender4.Show();
                    }
                    else
                    {
                        Label2.Text = "Ο/Η " + " <b>" + row.Cells[13].Text + " </b>" + " θα διεκπεραιωθεί από τον  <b>" + User.Identity.Name + " </b>";
                        Session["Index_select_row_for_TakeOver"] = GridView3.SelectedIndex;
                        TextBox135.Text = row.Cells[20].Text;
                        ModalPopupExtender1.Show();
                        Resv_For_Marqee.DataBind();
                        Repeater1.DataBind();
                    }
                }
                else
                {
                    Session["Return_Path_for_Personel_Tameio"] = "/Kiosk/Kinisis_Kiosk.aspx";
                    Session["Edit_YN"]            = row.Cells[17].Text;
                    Session["ID_Pers_Check_Proj"] = row.Cells[20].Text;
                    ScriptManager.RegisterStartupScript(this, typeof(string), "OPEN_WINDOW", "var Mleft = (screen.width/2)-(690/2);var Mtop = (screen.height-500)/2;window.open( 'PersonalDataKiosk.aspx', null, 'height=770,width=1200,directories=no,titlebar=no,status=no,toolbar=no,scrollbars=no,menubar=no,location=no, left=\'+Mleft+\'' );", true);
                    Session["Update_ABE_WAIT_Schedule"] = "1";
                    GridView3.SelectedIndex             = -1;
                }
            }
        }
コード例 #8
0
 protected void Page_Load(object sender, EventArgs e)
 {
     DataSet1TableAdapters.EGITIMTableAdapter dt = new DataSet1TableAdapters.EGITIMTableAdapter();
     Repeater1.DataSource = dt.EgitimListele();
     Repeater1.DataBind();
 }
コード例 #9
0
ファイル: minerCheck.aspx.cs プロジェクト: snow9581/sichang
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            string km = "";

            if (Session["km"] != null)
            {
                km = Session["km"].ToString();
            }

            string id   = Request.Params["id"];
            string name = Request.Params["name"];
            NAME.Value  = name;
            hd_id.Value = id;
            DB db = new DB();

            //  string wordname = "";
            string    excelname = "";//汇总报告
            DataTable dt2       = new DataTable();
            if (id != null && id != "")
            {
                string sql2 = "select excelname from t_minerflow where id=" + id + " and minername ='" + km + "'";
                dt2 = db.GetDataTable(sql2); //数据源
            }
            if (dt2.Rows.Count > 0)
            {
                //    wordname = dt2.Rows[0]["wordname"].ToString();
                excelname = dt2.Rows[0]["excelname"].ToString();
            }
            // WORDNAME.Value = wordname;
            // EXCELNAME.Value = excelname;
            string    sql = "select teamname,excelname from t_team where id = " + id + " and minername = '" + km + "'";
            DataTable dt  = new DataTable();
            dt = db.GetDataTable(sql); //数据源

            if (excelname != "#")
            {
                dt.Clear();
                DataRow newRow;
                newRow              = dt.NewRow();
                newRow["teamname"]  = "汇总";
                newRow["excelname"] = excelname;
                dt.Rows.Add(newRow);
            }

            Repeater1.DataSource = dt;
            Repeater1.DataBind();
            //已接收
            string    minercheck     = "";
            string    update_sql     = "";
            string    sql_minercheck = "select MINERCHECK from T_MINERFLOW where id=" + id + " and MINERNAME='" + km + "'";
            DataTable dt1            = new DataTable();
            if (id != null && id != "")
            {
                dt1 = db.GetDataTable(sql_minercheck); //数据源
            }
            if (dt1.Rows.Count > 0)
            {
                minercheck = dt1.Rows[0]["MINERCHECK"].ToString();
            }
            if (minercheck != "0" && minercheck != "1")
            {
                update_sql = "update T_MINERFLOW set MINERCHECK='2' where id=" + id + " and MINERNAME='" + km + "'";
            }
            bool flag = db.ExecuteSQL(update_sql);
        }
    }
コード例 #10
0
    void vizual()
    {
        lblrayon.Text  = ddlrayon.SelectedItem.ToString();
        lblbeladi.Text = ddlbelediyye.SelectedItem.ToString();

        string bel;
        string ray;
        string sahe;
        string teyinati;
        string teyinati1;



        if (ddlbelediyye.SelectedValue == "-1" || ddlbelediyye.SelectedValue == "")
        {
            bel = "  ";
        }
        else
        {
            bel = " and lcm.MunicipalID='" + ddlbelediyye.SelectedValue + "' ";
        }
        if (ddlrayon.SelectedValue == "-1" || ddlrayon.SelectedValue == "" || ddlrayon.SelectedValue == null)
        {
            ray = "  ";
        }
        else
        {
            ray = " and lcm.RegionID='" + ddlrayon.SelectedValue + "' ";
        }

        if (cmbsahe.SelectedValue == "-1" || cmbsahe.SelectedValue == "" || cmbsahe.SelectedValue == null)
        {
            sahe = "  ";
        }
        else
        {
            sahe = " and p.ExpensesAreaID='" + cmbsahe.SelectedValue + "' ";
        }
        if (cmbxerc.SelectedValue == "-1" || cmbxerc.SelectedValue == "" || cmbxerc.SelectedValue == null)
        {
            teyinati  = "  ";
            teyinati1 = "  ";
        }
        else
        {
            teyinati  = " and p.ExpensesSubAreaID='" + cmbxerc.SelectedValue + "' ";
            teyinati1 = ",p.ExpensesSubAreaID ";
        }

        string hesabatayi1 = " "; string hesabatayi1x = "  "; string hesabatayi1y = "  ";

        if (cmbhesabatayi1.SelectedValue == "-1" || cmbhesabatayi1.SelectedValue == "" || cmbhesabatayi1.SelectedValue == null)
        {
            hesabatayi1  = "  ";
            hesabatayi1x = "  ";
            hesabatayi1y = "  ";
        }
        else
        {
            hesabatayi1  = " and " + cmbhesabatayi1.SelectedItem.ToString() + "<=month(p.NowTime) ";
            hesabatayi1x = " and " + cmbhesabatayi1.SelectedItem.ToString() + "<= p.ExpensesHalfYear ";
            hesabatayi1y = " and " + cmbhesabatayi1.SelectedItem.ToString() + "<=month(p.DotationGiveDate) ";
        }

        string hesabatayi2 = " "; string hesabatayi2x = " "; string hesabatayi2y = " ";

        if (cmbhesabatayi2.SelectedValue == "-1" || cmbhesabatayi2.SelectedValue == "" || cmbhesabatayi2.SelectedValue == null)
        {
            hesabatayi2  = "  ";
            hesabatayi2x = " ";
            hesabatayi2y = " ";
        }
        else
        {
            hesabatayi2  = " and " + cmbhesabatayi2.SelectedItem.ToString() + ">=month(p.NowTime) ";
            hesabatayi2x = " and " + cmbhesabatayi2.SelectedItem.ToString() + ">= p.ExpensesHalfYear ";
            hesabatayi2y = " and " + cmbhesabatayi2.SelectedItem.ToString() + ">=month(p.DotationGiveDate) ";
        }

        umumigelir.Text = klas.getdatacell(@"select cast((select case when SUM(p.amount) is null then 0 else SUM(p.amount) end mebleg     
    from Taxpayer tx inner join Payments p on tx.TaxpayerID=p.TaxpayerID inner join List_classification_Municipal lcm 
on tx.MunicipalID=lcm.MunicipalID  where  p.Operation=10  and "
                                           + cmbhesabatili.SelectedItem.ToString() + "=year(p.NowTime) " + hesabatayi1 + hesabatayi2 + bel + ray +
                                           @" ) + (select case when SUM(p.amount) is null then 0 else SUM(p.amount) end mebleg from Dotation p 
inner join List_classification_Municipal lcm on p.MunicipalID=lcm.MunicipalID where Dotationtype in (1,2,3) and 
year(DotationGiveDate)=" + cmbhesabatili.SelectedItem.ToString() + hesabatayi1 + hesabatayi2 + bel + ray +
                                           @") +(select (select case when SUM(p.amount) is null then 0 else SUM(p.amount) end mebleg from Taxpayer m inner join Payments p on 
m.TaxpayerID=p.TaxpayerID inner join List_classification_Municipal lcm on m.MunicipalID=lcm.MunicipalID where  p.Operation=10 and 
 " + cmbhesabatili.SelectedItem.ToString() + "-1>=year(p.NowTime)  " + bel + ray +
                                           " )  + (select  case when SUM(m.amount) is null then 0 else SUM(m.amount) end cemi  from Dotation m inner join List_classification_Municipal lcm " +
                                           "on m.MunicipalID=lcm.MunicipalID where  year(DotationGiveDate)<=" + cmbhesabatili.SelectedItem.ToString() + "-1 " + bel + ray +
                                           " )  -  (select  case when SUM(case when p.amount is null then 0 else p.amount end+case when DFMF22 is null then 0 else dfmf22 end) is null then 0 else " +
                                           " SUM(case when p.amount is null then 0 else p.amount end+case when DFMF22 is null then 0 else dfmf22 end) end xerc   from ExpensesProject p inner join List_classification_Municipal lcm " +
                                           " on p.MunicipalID=lcm.MunicipalID where  ExpensesYear<=" + cmbhesabatili.SelectedItem.ToString() + "-1  " + bel + ray + "  and ExpensesType=1  )) as numeric(15,2)) ");


        gelir.Text = klas.getdatacell(@"select cast(Sum(p.Amount) as numeric(18,2)) mebleg      
   from Taxpayer tx inner join Payments p on tx.TaxpayerID=p.TaxpayerID inner join List_classification_Municipal lcm 
on tx.MunicipalID=lcm.MunicipalID  where  p.Operation=10  and "
                                      + cmbhesabatili.SelectedItem.ToString() + "=year(p.NowTime) " + hesabatayi1 + hesabatayi2 + bel + ray);

        dotasiya.Text = klas.getdatacell(@"select cast(SUM(amount) as numeric(18,2)) as cemi from Dotation p 
inner join List_classification_Municipal lcm 
on p.MunicipalID=lcm.MunicipalID where Dotationtype=1 and year(DotationGiveDate)=" + cmbhesabatili.SelectedItem.ToString() + hesabatayi1y + hesabatayi2y + bel + ray);

        iane.Text = klas.getdatacell(@"select cast(SUM(amount) as numeric(18,2)) as cemi from Dotation p 
inner join List_classification_Municipal lcm 
on p.MunicipalID=lcm.MunicipalID where Dotationtype=2 and year(DotationGiveDate)=" + cmbhesabatili.SelectedItem.ToString() + hesabatayi1 + hesabatayi2 + bel + ray);

        lbldiger.Text = klas.getdatacell(@"select cast(SUM(amount) as numeric(18,2)) as cemi from Dotation p 
inner join List_classification_Municipal lcm 
on p.MunicipalID=lcm.MunicipalID where Dotationtype=3 and year(DotationGiveDate)=" + cmbhesabatili.SelectedItem.ToString() + hesabatayi1 + hesabatayi2 + bel + ray);

        lblxerc.Text = klas.getdatacell(@"select cast(SUM(amount+case when DFMF22 is null then 0 else dfmf22 end) as numeric(18,2)) cemi from ExpensesProject p 
inner join List_classification_Municipal lcm
on p.MunicipalID=lcm.MunicipalID where ExpensesType=1 and ExpensesYear="
                                        + cmbhesabatili.SelectedItem.ToString() + hesabatayi1x + hesabatayi2x + bel + ray + sahe + teyinati);

        lbllayihe.Text = klas.getdatacell(@"select cast(SUM(amount) as numeric(18,2)) cemi from ExpensesProject p 
inner join List_classification_Municipal lcm
on p.MunicipalID=lcm.MunicipalID where ExpensesType=2 and ExpensesYear="
                                          + cmbhesabatili.SelectedItem.ToString() + hesabatayi1x + hesabatayi2x + bel + ray + sahe + teyinati);


        lblqaliq.Text = klas.getdatacell(@"select cast((select case when SUM(p.amount) is null then 0 else SUM(p.amount) end mebleg from Taxpayer m inner join Payments p on 
m.TaxpayerID=p.TaxpayerID inner join List_classification_Municipal lcm on m.MunicipalID=lcm.MunicipalID where  p.Operation=10 and 
 " + cmbhesabatili.SelectedItem.ToString() + "-1>=year(p.NowTime)  " + bel + ray +
                                         " )  + (select  case when SUM(m.amount) is null then 0 else SUM(m.amount) end cemi from Dotation m inner join List_classification_Municipal lcm " +
                                         "on m.MunicipalID=lcm.MunicipalID where  year(DotationGiveDate)<=" + cmbhesabatili.SelectedItem.ToString() + "-1 " + bel + ray +
                                         " )  -  (select  case when SUM(case when p.amount is null then 0 else p.amount end+case when DFMF22 is null then 0 else dfmf22 end) is null then 0 else " +
                                         " SUM(case when p.amount is null then 0 else p.amount end+case when DFMF22 is null then 0 else dfmf22 end) end xerc  from ExpensesProject p inner join List_classification_Municipal lcm " +
                                         " on p.MunicipalID=lcm.MunicipalID where  ExpensesYear<=" + cmbhesabatili.SelectedItem.ToString() + "-1  " + bel + ray + " and ExpensesType=1 ) as numeric(18,2))");

        string vaxt = cmbhesabatili.SelectedItem.ToString();

        trx.Text = trx1.Text = trx2.Text = trx3.Text = trx4.Text = vaxt;

        //string buil = klas.getdatacell("select year(getdate()) il");
        //string kecenil = klas.getdatacell("select year(getdate())-1 il");
        //lbltrx29.Text = buil;
        //lbltrx.Text = buil;
        //lbltrx0.Text = buil;
        //lbltrx1.Text = buil;


        DataTable region2 = klas.getdatatable(@"select case when lr.CityID = 2 then lr.Name + ' ' + 'rayonu' 
when lr.CityID = 1 then lr.Name + ' ' + N'şəhəri' end as Name,lcm.MunicipalName,ExpensesID,Amount ayri,
Convert(nvarchar(50),cast(mebleg1 as numeric(15,2))) teyinat,
ep1.MunicipalID,ep1.MunicipalName,ep1.ExpensesYear,Convert(nvarchar(50),cast(ep1.mebleg as decimal(15,2))) sahe,ep1.ExpensesAreaID,ep1.ExpensesAreaName,
Convert(nvarchar(50), c.ExpensesSubAreaID) ExpensesSubAreaID,c.ExpensesSubAreaName,ad.NoteText,case when lcc.sort Is null then 100000 else lcc.sort  end  as sort1,
case when lcc1.sort Is null then 100000 else lcc1.sort  end  as sort2
 from (
select SUM(Amount+case when DFMF22 is null then 0 else DFMF22 end) mebleg,ExpensesYear,p.MunicipalID,p.ExpensesAreaID,p.ExpensesAreaName,lcm.MunicipalName " + teyinati1 + "  from ExpensesProject p " +
                                              "inner join List_classification_Municipal lcm on p.MunicipalID=lcm.MunicipalID where ExpensesType=1  and ExpensesYear=" + cmbhesabatili.SelectedItem.ToString() + hesabatayi1x + hesabatayi2x + bel + ray + sahe + teyinati +
                                              "group by ExpensesYear,p.MunicipalID,p.ExpensesAreaID,p.ExpensesAreaName,lcm.MunicipalName " + teyinati1 + " ) as ep1 " +
                                              "inner join (" +
                                              "select SUM(Amount) mebleg1,ExpensesYear,p.ExpensesAreaID,p.MunicipalID,p.ExpensesSubAreaID," +
                                              "p.ExpensesAreaName,p.ExpensesSubAreaName,lcm.MunicipalName from ExpensesProject p " +
                                              "inner join List_classification_Municipal lcm on p.MunicipalID=lcm.MunicipalID where ExpensesType=1  and ExpensesYear=" + cmbhesabatili.SelectedItem.ToString() + hesabatayi1x + hesabatayi2x + bel + ray + sahe + teyinati +
                                              "group by ExpensesYear,p.MunicipalID,p.ExpensesAreaID,p.ExpensesAreaName,lcm.MunicipalName,p.ExpensesSubAreaID,p.ExpensesSubAreaName " +
                                              ") as c on c.MunicipalID=ep1.MunicipalID and c.ExpensesYear=ep1.ExpensesYear and c.ExpensesAreaID=ep1.ExpensesAreaID  " +
                                              "and c.ExpensesAreaName=ep1.ExpensesAreaName " +
                                              "inner join ( " +
                                              "select ExpensesID,NoteText,ExpensesYear,p.ExpensesAreaID,p.MunicipalID,p.ExpensesSubAreaID,(Amount+case when DFMF22 is null then 0 else DFMF22 end) Amount, " +
                                              "p.ExpensesAreaName,p.ExpensesSubAreaName,lcm.MunicipalName from ExpensesProject p  " +
                                              "inner join List_classification_Municipal lcm on p.MunicipalID=lcm.MunicipalID where ExpensesType=1  and ExpensesYear=" + cmbhesabatili.SelectedItem.ToString() + hesabatayi1x + hesabatayi2x + bel + ray + sahe + teyinati +
                                              @") ad on ad.MunicipalID=c.MunicipalID and ad.ExpensesYear=c.ExpensesYear and  
ad.ExpensesAreaID=c.ExpensesAreaID and c.ExpensesSubAreaID=ad.ExpensesSubAreaID and c.ExpensesAreaName=ad.ExpensesAreaName 
and c.ExpensesSubAreaName=ad.ExpensesSubAreaName 
left join List_classifications lcc on lcc.ClassifID=c.ExpensesAreaID 
left join List_classifications lcc1 on lcc1.ClassifID=c.ExpensesSubAreaID 
inner join List_classification_Municipal lcm on lcm.MunicipalID=ep1.MunicipalID 
inner join List_classification_Regions lr on lcm.RegionID=lr.RegionsID order by MunicipalID,sort1,sort2");



        Repeater1.DataSource = klas.tekrarlamaxerc("ExpensesAreaID", "ExpensesAreaName", "ExpensesSubAreaID", "ExpensesSubAreaName", "sahe", "Sn", region2);
        Repeater1.DataBind();
    }
コード例 #11
0
        private void GetDepositor(string AccountNumber)
        {
            depositorInfo.Style.Add("display", "none");
            StorageList.Style.Add("display", "none");


            string strSqlSimulate = "SELECT B.ISSimulate FROM dbo.Depositor A INNER JOIN dbo.WB B ON A.WBID=B.ID WHERE A.AccountNumber='" + AccountNumber + "' ";
            object objSimulate    = SQLHelper.ExecuteScalar(strSqlSimulate);

            if (Convert.ToBoolean(objSimulate))
            {
                Fun.Alert("您当前查询的账户为模拟账户,不可以继续操作!");
                return;
            }

            StringBuilder strSql = new StringBuilder();

            strSql.Append("   select ID,WBID,AccountNumber,strPassword,CunID as  BD_Address_CunID,strAddress,strName,PhoneNO,ISSendMessage,BankCardNO,dt_Update,");
            strSql.Append("   CASE( numState) WHEN 1 THEN '正常' ELSE '挂失' END AS numState,dt_Add,");
            strSql.Append("   CASE (IDCard) WHEN '' THEN '未填写' ELSE '******' END as IDCard");
            strSql.Append(" FROM dbo.Depositor ");
            strSql.Append(" where 1=1 ");

            strSql.Append(" and AccountNumber=@AccountNumber ");
            SqlParameter[] parameters =
            {
                new SqlParameter("@AccountNumber", SqlDbType.NVarChar, 50)
            };
            parameters[0].Value = AccountNumber;
            DataTable dt = SQLHelper.ExecuteDataTable(strSql.ToString(), parameters);

            if (dt != null && dt.Rows.Count != 0)
            {
                string numState = dt.Rows[0]["numState"].ToString();

                if (numState == "0")
                {
                    string StrScript;
                    StrScript  = ("<script language=javascript>");
                    StrScript += ("alert('您查询的账户已经申请挂失!');");
                    StrScript += ("</script>");
                    System.Web.HttpContext.Current.Response.Write(StrScript);
                    return;
                }
                depositorInfo.Style.Add("display", "block");
                D_strName.InnerText       = dt.Rows[0]["strName"].ToString();
                D_strAddress.InnerText    = dt.Rows[0]["strAddress"].ToString();
                D_PhoneNo.InnerText       = dt.Rows[0]["PhoneNo"].ToString();
                D_AccountNumber.InnerText = dt.Rows[0]["AccountNumber"].ToString();
                D_numState.InnerText      = dt.Rows[0]["numState"].ToString();
                D_IDCard.InnerText        = dt.Rows[0]["IDCard"].ToString();
                this.Page.ClientScript.RegisterStartupScript(this.GetType(), "js", "ShowDepositorInfo()", true);

                //获取存粮信息
                StringBuilder strSqlStorage = new StringBuilder();
                strSqlStorage.Append("SELECT A.ID,A.StorageNumber,convert(varchar(10),A.StorageDate,120) AS StorageDate, A.AccountNumber,B.strName AS VarietyID,A.Price_ShiChang,A.Price_DaoQi,A.CurrentRate,C.strName AS TimeID,A.StorageFee");
                strSqlStorage.Append("  FROM dbo.Dep_StorageInfo A INNER JOIN dbo.StorageVariety B ON A.VarietyID=B.ID");
                strSqlStorage.Append("  INNER JOIN dbo.StorageTime C ON A.TimeID=C.ID");
                strSqlStorage.Append("  WHERE AccountNumber='" + AccountNumber + "'");
                strSqlStorage.Append("  and A.StorageNumber>0");
                DataTable dtStorage = SQLHelper.ExecuteDataTable(strSqlStorage.ToString());
                if (dtStorage != null && dtStorage.Rows.Count != 0)
                {
                    StorageList.Style.Add("display", "block");
                    Repeater1.DataSource = dtStorage;
                    Repeater1.DataBind();
                }


                //获取储户的存转销信息
                StringBuilder strSqlEx = new StringBuilder();

                strSqlEx.Append("  SELECT ID, BusinessName,CONVERT(varchar(100), dt_Sell, 111) AS dt_Sell,VarietyName,VarietyCount,StorageDate,VarietyInterest,VarietyMoney");
                strSqlEx.Append("  FROM dbo.StorageSell ");
                strSqlEx.Append("  WHERE 1=1");
                strSqlEx.Append("  and ISReturn=0");                                                                                             //查询没有退还记录的商品
                strSqlEx.Append("  AND Dep_AccountNumber='" + QAccountNumber.Value.Trim() + "'");
                strSqlEx.Append("  and  ID NOT IN (SELECT StorageSellID  FROM dbo.SA_Sell WHERE Dep_AN='" + QAccountNumber.Value.Trim() + "')"); //排除已经被结算的存转销
                DataTable dtEx = SQLHelper.ExecuteDataTable(strSqlEx.ToString());
                if (dtEx != null && dtEx.Rows.Count != 0)
                {
                    divYes.Style.Add("display", "block");
                    divNO.Style.Add("display", "none");
                    divNO.Visible        = false;
                    Repeater2.DataSource = dtEx;
                    Repeater2.DataBind();
                }
                else
                {
                    divYes.Style.Add("display", "none");
                    divNO.Style.Add("display", "block");
                }
            }
            else
            {
                string StrScript;
                StrScript  = ("<script language=javascript>");
                StrScript += ("alert('您查询的储户不存在!');");
                StrScript += ("</script>");
                System.Web.HttpContext.Current.Response.Write(StrScript);
                return;
            }
        }
コード例 #12
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            //用户登录验证
            pyrc.zoneNet login = new pyrc.zoneNet();
            //login.tempsession();//测试用
            login.loginCheck();
            login.authority(4);

            //Label1为隐藏控件,用于传值到upfile.aspx
            Label1.Text = Request.QueryString["id"];
            //加载数据
            if (Request.QueryString["id"] != null)
            {
                int id = System.Int32.Parse(Request.QueryString["id"]);
                int m  = System.Int32.Parse(Request.QueryString["m"]);
                if (m == 1)
                {
                    Button1.Enabled = false; Button1.Visible = false; Button4.Visible = false; iframe1.Visible = false; exChange.Visible = false;
                }
                ;                                                                                                                                         //1:查看,0:编辑
                SqlConnection sqlconn = new SqlConnection();
                sqlconn.ConnectionString = ConfigurationManager.ConnectionStrings["zoneNetConn"].ConnectionString;
                //问题类别列表
                SqlDataAdapter sqldar = new SqlDataAdapter("select * from [optQuestion]", sqlconn);
                DataSet        Ds     = new DataSet();
                sqldar.Fill(Ds, "List");
                B02.DataSource     = Ds.Tables["List"].DefaultView;
                B02.DataTextField  = "Q01";
                B02.DataValueField = "Q00";
                sqlconn.Open();
                B02.DataBind();
                sqlconn.Close();

                var cmd = new SqlCommand("SELECT * FROM TableApply a left join optHandleState b on a.B08=b.C00 left join optQuestion c on a.B02=c.Q00 left join TableUser d on a.B01=d.U00 where B00=" + id, sqlconn);
                sqlconn.Open();
                SqlDataReader read = cmd.ExecuteReader(CommandBehavior.CloseConnection);
                if (read.Read())
                {
                    U05.Text          = read["U05"].ToString();
                    U04.Text          = read["U04"].ToString();
                    U06.Text          = read["U06"].ToString();
                    U07.Text          = read["U07"].ToString();
                    U08.Text          = read["U08"].ToString();
                    B02.SelectedValue = read["Q00"].ToString();
                    B03.Text          = read["B03"].ToString();
                    B05.Text          = read["B05"].ToString();
                    B04.InnerText     = read["B04"].ToString();
                    B10.InnerText     = read["B10"].ToString();
                    B12.InnerText     = read["B12"].ToString();
                }
                read.Close();
                //当前跟进
                var cmd1 = new SqlCommand("SELECT * FROM TableApply a left join (select D01, D03 from TableHandleState where D00 in (select max(D00) mD00 from TableHandleState group by D01)) e on a.B00 = e.D01 left join TableUser b on e.D03=b.U00  where B00 = " + id, sqlconn);
                sqlconn.Open();
                read = cmd1.ExecuteReader(CommandBehavior.CloseConnection);
                if (read.Read())
                {
                    D03.Text = read["U04"].ToString();
                }
                read.Close();

                zoneNet1.ConnectionString = ConfigurationManager.ConnectionStrings["zoneNetConn"].ConnectionString;
                zoneNet1.SelectParameters.Clear();
                zoneNet1.SelectCommand = "SELECT * FROM [dbo].[TableUpfile] where F01=@id and F06=1 and F07=0 order by F00 asc";
                zoneNet1.SelectParameters.Add("id", System.TypeCode.Int32, id.ToString());
                Repeater1.DataSourceID = "zoneNet1";
                Repeater1.DataBind();

                zoneNet2.ConnectionString = ConfigurationManager.ConnectionStrings["zoneNetConn"].ConnectionString;
                zoneNet2.SelectParameters.Clear();
                zoneNet2.SelectCommand = "SELECT * FROM [dbo].[TableUpfile] where F01=@id and F06=1 and F07=1 order by F00 asc";
                zoneNet2.SelectParameters.Add("id", System.TypeCode.Int32, id.ToString());
                Repeater2.DataSourceID = "zoneNet2";
                Repeater2.DataBind();

                zoneNet3.ConnectionString = ConfigurationManager.ConnectionStrings["zoneNetConn"].ConnectionString;
                zoneNet3.SelectParameters.Clear();
                zoneNet3.SelectCommand = "SELECT * FROM [dbo].[TableHandleState] a left join TableUser b on a.D02=b.U00 where D01=@id order by D00 asc";
                zoneNet3.SelectParameters.Add("id", System.TypeCode.Int32, id.ToString());
                Repeater3.DataSourceID = "zoneNet3";
                Repeater3.DataBind();

                //流转人列表
                SqlDataAdapter sqldar1 = new SqlDataAdapter("select * from [TableUser] where (U16=2 or U16=3) and U17=1", sqlconn);//U16:1=园区,2=内部,3=管理员;U17:1=有效
                DataSet        Ds1     = new DataSet();
                sqldar1.Fill(Ds1, "List");
                U00.DataSource     = Ds1.Tables["List"].DefaultView;
                U00.DataTextField  = "U04";
                U00.DataValueField = "U00";
                sqlconn.Open();
                U00.DataBind();
                sqlconn.Close();
            }
        }
    }
コード例 #13
0
 protected void Page_Load(object sender, EventArgs e)
 {
     DataSet1TableAdapters.ANNOUNCEMENTS_TABLETableAdapter dt = new DataSet1TableAdapters.ANNOUNCEMENTS_TABLETableAdapter();
     Repeater1.DataSource = dt.AnnouncementList();
     Repeater1.DataBind();
 }
コード例 #14
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                String     sql  = "select * from PType where parentId=0";
                SqlCommand comm = new SqlCommand(sql, conn);
                conn.Open();
                SqlDataReader dr = comm.ExecuteReader();
                Repeater1.DataSource = dr;
                Repeater1.DataBind();
                dr.Close();
                conn.Close();
                string mysql = "";
                string strID = "0";
                if (Request.QueryString["categoryid"] != null)
                {
                    strID = Request.QueryString["categoryid"].ToString();
                    if (strID.Equals("0"))
                    {
                        mysql = "SELECT * FROM PerHomeDetail";
                    }
                    else
                    {
                        mysql = "SELECT * FROM PerHomeDetail where PerHomeClass=" + strID;
                    }
                }
                else
                {
                    mysql = "SELECT * FROM PerHomeDetail";
                }
                SqlDataAdapter da = new SqlDataAdapter(mysql, conn);
                DataSet        ds = new DataSet();
                da.Fill(ds, "Table");
                /*创建分页类*/
                PagedDataSource ObjectPage = new PagedDataSource();
                ObjectPage.DataSource = ds.Tables["Table"].DefaultView;
                /*设置分页*/
                ObjectPage.AllowPaging = true;
                ObjectPage.PageSize    = 10;
                if (Request.QueryString["Page"] != null)
                {
                    DangQianPage = Convert.ToInt32(Request.QueryString["Page"]);
                    DangQianPage = Math.Min(DangQianPage, ObjectPage.PageCount);
                    DangQianPage = Math.Max(DangQianPage, 1);
                }
                else
                {
                    DangQianPage = 1;
                }
                /*取得当前页码*/
                ObjectPage.CurrentPageIndex = DangQianPage - 1;
                ZhongPage        = ObjectPage.PageCount;
                MRNum            = ObjectPage.DataSourceCount;
                MeiYiPage        = ObjectPage.Count;
                lblCurPage.Text  = "第" + DangQianPage.ToString() + "/" + ZhongPage.ToString() + "页";
                lblTnum.Text     = "共:" + MRNum.ToString() + "条记录";
                lblEachPage.Text = "每页有: " + MeiYiPage.ToString() + " 条记录";
                if (ObjectPage.CurrentPageIndex != 0)
                {
                    lnkFirst.NavigateUrl = Request.CurrentExecutionFilePath + "?categoryid=" + strID + "&Page=" + Convert.ToString(1);
                }
                if (ObjectPage.CurrentPageIndex != ZhongPage - 1)
                {
                    lnkLast.NavigateUrl = Request.CurrentExecutionFilePath + "?categoryid=" + strID + "&Page=" + Convert.ToString(ZhongPage);
                }
                if (!ObjectPage.IsFirstPage)
                {
                    lnkPrev.NavigateUrl = Request.CurrentExecutionFilePath + "?categoryid=" + strID + "&Page=" + Convert.ToString(DangQianPage - 1);
                }
                if (!ObjectPage.IsLastPage)
                {
                    lnkNext.NavigateUrl = Request.CurrentExecutionFilePath + "?categoryid=" + strID + "&Page=" + Convert.ToString(DangQianPage + 1);
                }
                DataList1.DataSource = ObjectPage;
                DataList1.DataBind();
                conn.Close();
                String     strsql2 = "select * from PType where category_ID=" + strID;
                SqlCommand comm2   = new SqlCommand(strsql2, conn);
                conn.Open();
                SqlDataReader mydr2 = comm2.ExecuteReader();

                if (mydr2.Read())
                {
                    Label1.Text = mydr2["category_name"].ToString();
                }
                else
                {
                    Label1.Text = "所有分类";
                }
                conn.Close();
            }
        }
コード例 #15
0
        protected void btnShow_Click(object sender, EventArgs e)
        {
            lblSTdelay.Text = "";
            lblSdelay.Text  = "";
            lblSce.Text     = "";

            gvToken.Visible = false;
            ServiceCls scls = new ServiceCls();
            string     sdt  = sDate.Text;

            if (Convert.ToInt32(ddlReportType.SelectedItem.Value) == 1)
            {
                pnlAnomalies.Visible = false;
                pnlTokens.Visible    = true;
                Repeater1.Visible    = false;
                DataTable dt = scls.getTokenStatistics(ddlServices.SelectedItem.Value.ToString(), sdt);
                Repeater1.DataSource = dt;
                Repeater1.DataBind();
                Repeater1.Visible = true;
                //  lblMsg.Visible = false;
            }
            else
            {
                //lblMsg.Visible = true;
                //Repeater1.Visible = false;
                //lblMsg.Text = "No records found.";
                pnlAnomalies.Visible = true;
                pnlTokens.Visible    = false;
                DataSet ds = scls.getServiceAnomalies(ddlServices.SelectedItem.Value.ToString(), sdt);
                if (ds.Tables[0].Rows.Count > 0)
                {
                    gvSTdelay.DataSource = ds.Tables[0];
                    gvSTdelay.DataBind();
                    gvSTdelay.Visible = true;
                }

                else
                {
                    lblSTdelay.Text   = "no service token delays found.";
                    gvSTdelay.Visible = false;
                }
                if (ds.Tables[1].Rows.Count > 0)
                {
                    gvSdelay.DataSource = ds.Tables[1];
                    gvSdelay.DataBind();
                    gvSdelay.Visible = true;
                }

                else
                {
                    lblSdelay.Text   = "no service delays found.";
                    gvSdelay.Visible = false;
                }
                if (ds.Tables[2].Rows.Count > 0)
                {
                    if (ds.Tables[2].Rows[0]["RoomNo"].ToString() != "0")
                    {
                        gvSce.DataSource = ds.Tables[2];
                        gvSce.DataBind();
                        gvSce.Visible = true;
                    }
                    else
                    {
                        lblSce.Text   = "no services closed early for the selected date (or) closing times can be shown for previous dates.";
                        gvSce.Visible = false;
                    }
                }
            }
        }
コード例 #16
0
    public void BindOrders(Int64 Oid)
    {
        try
        {
            con.Open();
            DataSet    ds  = new DataSet();
            SqlCommand cmd = new SqlCommand();
            cmd.CommandText = "Display_PurchaseOrder";
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Connection  = con;
            cmd.Parameters.AddWithValue("@oid", Oid);
            //con.Open();
            SqlDataAdapter da = new SqlDataAdapter(cmd);
            da.Fill(ds);

            if (ds.Tables[0] != null)
            {
                ddlname.SelectedValue = ds.Tables[0].Rows[0]["uid"].ToString();
                ddlname_SelectedIndexChanged(null, null);

                ddlinvoiceType.SelectedValue = ds.Tables[0].Rows[0]["invoicetype"].ToString();
                txt_InvoieNo.Text            = ds.Tables[0].Rows[0]["invoiceno"].ToString();
                //if (ds.Tables[0].Rows[0]["orderno"].ToString() == "Cash")
                //{
                //    rdoCash.Checked = true;
                //    rdoCredit.Checked = false;

                //}
                //else if (ds.Tables[0].Rows[0]["orderno"].ToString() == "Credit")
                //{
                //    rdoCash.Checked = false;
                //    rdoCredit.Checked = true;
                //}
                ddlaccountYear.SelectedValue = ds.Tables[0].Rows[0]["accountYear"].ToString();

                txt_Date.Text = ds.Tables[0].Rows[0]["orderdate"].ToString();

                txt_Subtotal.Text = ds.Tables[0].Rows[0]["subtotal"].ToString();
                txttradDis.Text   = ds.Tables[0].Rows[0]["discandScheme"].ToString();
                txtFriegtAmt.Text = ds.Tables[0].Rows[0]["frieghtamount"].ToString();

                txttaxableAmt.Text = ds.Tables[0].Rows[0]["taxableamount"].ToString();
                txtcsgtfinal.Text  = ds.Tables[0].Rows[0]["CGSTamt"].ToString();
                txtsgstfinal.Text  = ds.Tables[0].Rows[0]["SGSTamt"].ToString();
                txtIgstfinal.Text  = ds.Tables[0].Rows[0]["IGSTamt"].ToString();
                txttotalAmt.Text   = ds.Tables[0].Rows[0]["totalAmt"].ToString();

                txttransport.Text     = ds.Tables[0].Rows[0]["transportamt"].ToString();
                txtpacking.Text       = ds.Tables[0].Rows[0]["packingamt"].ToString();
                txtotherAmt.Text      = ds.Tables[0].Rows[0]["otheramt"].ToString();
                txtdiscountamt.Text   = ds.Tables[0].Rows[0]["dicountamt"].ToString();
                txttotalAmtfinal.Text = ds.Tables[0].Rows[0]["grandtotal"].ToString();
                txtStockDate.Text     = ds.Tables[0].Rows[0]["stockdate"].ToString();


                DataTable dtprodn = new DataTable();
                dtprodn = (DataTable)ViewState["dtprod"];
                dtprodn.Rows.Clear();
                for (int i = 0; i < ds.Tables[1].Rows.Count; i++)
                {
                    DataRow dr = dtprodn.NewRow();
                    dr["sr"]          = (i + 1).ToString();
                    dr["productName"] = ds.Tables[1].Rows[i]["productName"].ToString();
                    dr["pid"]         = Convert.ToInt64(ds.Tables[1].Rows[i]["pid"].ToString());
                    //  qty,rate,subtotal,discount,scheme,frieghtamt,taxableamt,csgtper,sgstper,igstper,gstamt,total,netrate

                    dr["qty"]        = Convert.ToInt64(ds.Tables[1].Rows[i]["qty"].ToString());
                    dr["rate"]       = Convert.ToString(ds.Tables[1].Rows[i]["rate"].ToString());
                    dr["subtotal"]   = Convert.ToDecimal(ds.Tables[1].Rows[i]["subtotal"].ToString());
                    dr["discount"]   = Convert.ToDecimal(ds.Tables[1].Rows[i]["discount"].ToString());
                    dr["scheme"]     = Convert.ToDecimal(ds.Tables[1].Rows[i]["scheme"].ToString());
                    dr["frieghtamt"] = Convert.ToDecimal(ds.Tables[1].Rows[i]["frieghtamt"].ToString());
                    dr["taxableamt"] = Convert.ToDecimal(ds.Tables[1].Rows[i]["taxableamt"].ToString());
                    dr["csgtper"]    = Convert.ToDecimal(ds.Tables[1].Rows[i]["csgtper"].ToString());
                    dr["sgstper"]    = Convert.ToDecimal(ds.Tables[1].Rows[i]["sgstper"].ToString());
                    dr["igstper"]    = Convert.ToDecimal(ds.Tables[1].Rows[i]["igstper"].ToString());
                    dr["gstamt"]     = Convert.ToDecimal(ds.Tables[1].Rows[i]["gstamt"].ToString());
                    dr["total"]      = Convert.ToDecimal(ds.Tables[1].Rows[i]["total"].ToString());
                    dr["netrate"]    = Convert.ToDecimal(ds.Tables[1].Rows[i]["netrate"].ToString());


                    //qty,rate,subtotal,discount,scheme,frieghtamt,taxableamt,csgtper,sgstper,igstper,gstamt,total,netrate

                    dtprodn.Rows.Add(dr);
                }

                Repeater1.DataSource = dtprodn;
                Repeater1.DataBind();
                ViewState["dtprod"] = dtprodn;
            }


            con.Close();
        }
        catch { }
        finally { con.Close(); }
    }
コード例 #17
0
 protected void Page_Load(object sender, EventArgs e)
 {
     Repeater1.DataSource = new Business.Common.Login().GetLoginDetails();
     Repeater1.DataBind();
 }
コード例 #18
0
    protected void rep_txtCart_TextChanged(object sender, EventArgs e)
    {
        try
        {
            RepeaterItem row = ((RepeaterItem)((TextBox)sender).NamingContainer);
            //NamingContainer return the container that the control sits in
            DataTable dtprodn = new DataTable();
            dtprodn = (DataTable)ViewState["dtprod"];

            Label txtsr = (Label)row.FindControl("txtsr");


            Label   rep_txtproductName = (Label)row.FindControl("rep_txtproductName");
            Label   rep_txtproductid   = (Label)row.FindControl("rep_txtproductid");
            TextBox rep_txtQty         = (TextBox)row.FindControl("rep_txtQty");
            Label   rep_txtRate        = (Label)row.FindControl("rep_txtRate");
            Label   rep_txtSubTotal    = (Label)row.FindControl("rep_txtSubTotal");
            TextBox rep_txtDiscount    = (TextBox)row.FindControl("rep_txtDiscount");

            Label rep_txtScheme     = (Label)row.FindControl("rep_txtScheme");
            Label rep_txtFrieghtAmt = (Label)row.FindControl("rep_txtFrieghtAmt");
            Label rep_txttaxable    = (Label)row.FindControl("rep_txttaxable");
            Label rep_txtCGST       = (Label)row.FindControl("rep_txtCGST");
            Label rep_txtSgst       = (Label)row.FindControl("rep_txtSgst");
            Label rep_txtIgst       = (Label)row.FindControl("rep_txtIgst");

            Label rep_txtGSTtotal = (Label)row.FindControl("rep_txtGSTtotal");
            Label rep_txtTotal    = (Label)row.FindControl("rep_txtTotal");
            Label rep_txtNetRate  = (Label)row.FindControl("rep_txtNetRate");



            if (rep_txtDiscount.Text == "")
            {
                rep_txtDiscount.Text = "0";
            }

            if (rep_txtQty.Text == "")
            {
                rep_txtQty.Text = "0";
            }

            decimal qty      = Convert.ToDecimal(rep_txtQty.Text);
            decimal rate     = Convert.ToDecimal(rep_txtRate.Text);
            decimal discount = Convert.ToDecimal(rep_txtDiscount.Text);
            decimal subtotal = qty * rate;

            decimal disamt = (subtotal * discount) / 100;
            decimal tot1   = subtotal - disamt;
            decimal gst    = Convert.ToDecimal(rep_txtCGST.Text) + Convert.ToDecimal(rep_txtSgst.Text) + Convert.ToDecimal(rep_txtIgst.Text);

            decimal taxable = (tot1 / (gst + 100)) * 100;
            // txttaxable.Text = System.Math.Round(taxable, 2).ToString();
            string finalTaxableamt = System.Math.Round(taxable, 2).ToString();

            decimal gstamt      = (taxable * gst) / 100;
            string  finalGSTamt = gstamt.ToString();
            string  FinalTotal  = "";
            // txtGSTtotal.Text = System.Math.Round(gstamt, 2).ToString();
            if (string.Equals("Excluding GST", ddlinvoiceType.SelectedValue.ToString()))
            {
                FinalTotal = (tot1 + gstamt).ToString();
            }
            else if (string.Equals("Including GST", ddlinvoiceType.SelectedValue.ToString()))
            {
                FinalTotal = (tot1).ToString();
            }


            DataRow[] drr = dtprodn.Select("sr='" + txtsr.Text + " ' ");
            foreach (var dr in drr)
            {
                dr["qty"] = rep_txtQty.Text.ToString();

                dr["discount"]   = rep_txtDiscount.Text;
                dr["subtotal"]   = System.Math.Round(subtotal, 2).ToString();
                dr["taxableamt"] = System.Math.Round(Convert.ToDecimal(finalTaxableamt), 2).ToString();
                dr["gstamt"]     = System.Math.Round(gstamt, 2).ToString();
                dr["total"]      = System.Math.Round(Convert.ToDecimal(FinalTotal), 2).ToString();
            }
            // dtProduct.Rows.RemoveAt(prodid);

            dtprodn.AcceptChanges();
            ViewState["dtprod"]  = dtprodn;
            Repeater1.DataSource = dtprodn;
            Repeater1.DataBind();
        }

        catch { }
        gridTotal();
    }
コード例 #19
0
 protected void Page_Load(object sender, EventArgs e)
 {
     DataSet1TableAdapters.Tbl_MesajlarTableAdapter dt = new DataSet1TableAdapters.Tbl_MesajlarTableAdapter();
     Repeater1.DataSource = dt.OgrenciGelenKutusu1(Session["OGRNUMARA"].ToString());
     Repeater1.DataBind();
 }
コード例 #20
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        try
        {
            if (ddlProduct.SelectedIndex == 0 || txtQty.Text == string.Empty)
            {
                //ScriptManager.RegisterStartupScript(this, GetType(), "alertmsg", "alert('Please Enter Proper Value ');", true);
                //return;
            }

            DataTable dtprodn = new DataTable();
            dtprodn = (DataTable)ViewState["dtprod"];

            DataRow[] drr = dtprodn.Select("pid='" + ddlProduct.SelectedValue.ToString() + " ' ");
            if (drr.Length > 0)
            {
                ScriptManager.RegisterClientScriptBlock(this, typeof(Page), "", "alert('This Product already add')", true);
            }
            else
            {
                DataRow dr     = dtprodn.NewRow();
                int     rowcnt = dtprodn.Rows.Count + 1;


                dr["sr"]          = rowcnt.ToString();
                dr["productName"] = ddlProduct.SelectedItem.ToString();
                dr["pid"]         = Convert.ToInt64(ddlProduct.SelectedValue.ToString());
                dr["qty"]         = Convert.ToString(txtQty.Text);
                dr["rate"]        = Convert.ToString(txtRate.Text);
                dr["subtotal"]    = Convert.ToString(txtSubTotal.Text);
                dr["discount"]    = Convert.ToDecimal(txtDiscount.Text);
                dr["scheme"]      = Convert.ToDecimal(txtScheme.Text);
                dr["frieghtamt"]  = Convert.ToDecimal(txtFrieghtAmt.Text);
                dr["taxableamt"]  = Convert.ToDecimal(txttaxable.Text);
                dr["csgtper"]     = Convert.ToDecimal(txtCGST.Text);
                dr["sgstper"]     = Convert.ToDecimal(txtSgst.Text);
                dr["igstper"]     = Convert.ToDecimal(txtIgst.Text);
                dr["gstamt"]      = Convert.ToDecimal(txtGSTtotal.Text);
                dr["total"]       = Convert.ToDecimal(txtTotal.Text);
                dr["netrate"]     = Convert.ToDecimal(txtNetRate.Text);



                dtprodn.Rows.Add(dr);
                Repeater1.DataSource = dtprodn;
                Repeater1.DataBind();
                ViewState["dtprod"] = dtprodn;


                txtQty.Text              = "0";
                txtRate.Text             = "0";
                txtSubTotal.Text         = "0";
                txtDiscount.Text         = "0";
                txtScheme.Text           = "0";
                txtFrieghtAmt.Text       = "0";
                txttaxable.Text          = "0";
                txtCGST.Text             = "0";
                txtSgst.Text             = "0";
                txtIgst.Text             = "0";
                txtGSTtotal.Text         = "0";
                txtTotal.Text            = "0";
                txtNetRate.Text          = "0";
                ddlProduct.SelectedIndex = 0;

                gridTotal();
            }
        }
        catch (Exception ex)
        {
            Response.Write(ex.Message + ex.StackTrace);
        }
    }
コード例 #21
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //retrieve the session variable
        txtSearch.Text = Session["Search"].ToString();

        //PostBack allows the search function to run again when another string is entered into the textbox.
        //if PostBack is not true/enabled, the method will only run one time and not run again if a new
        //string is entered.
        if (!IsPostBack)
        {
            //retrieve connection info from web.config
            string        strConnectionString = ConfigurationManager.ConnectionStrings["SunnyCS"].ConnectionString;
            SqlConnection myConnect           = new SqlConnection(strConnectionString);

            //open the connection
            myConnect.Open();

            //create search command to retrieve data from table
            string     checksearch = "SELECT COUNT(*) FROM [ALL_Products] WHERE Title LIKE @search OR Author LIKE @search";
            SqlCommand com         = new SqlCommand(checksearch, myConnect);

            //declare @search
            com.Parameters.AddWithValue("@search", txtSearch.Text);
            com.Parameters["@search"].Value = "%" + txtSearch.Text + "%";

            //use temp to create a fucntion
            int temp = Convert.ToInt32(com.ExecuteScalar().ToString());

            //close the connection
            myConnect.Close();

            //if the record exists
            if (temp > 0)
            {
                string strCommandText = "SELECT *";
                strCommandText += " FROM ALL_Products WHERE Title LIKE @title OR Author LIKE @author";
                SqlCommand cmd = new SqlCommand(strCommandText, myConnect);

                //declare cmd parameters for title and author to be dispayed
                cmd.Parameters.Add("@title", SqlDbType.NVarChar, 50);
                cmd.Parameters["@title"].Value = "%" + txtSearch.Text + "%";
                cmd.Parameters.Add("@author", SqlDbType.NVarChar, 50);
                cmd.Parameters["@author"].Value = "%" + txtSearch.Text + "%";

                //open the connection
                myConnect.Open();

                cmd.ExecuteNonQuery();
                SqlDataAdapter da = new SqlDataAdapter();
                da.SelectCommand = cmd;
                DataSet ds = new DataSet();
                da.Fill(ds, "Title");
                Repeater1.DataSource = ds;
                Repeater1.DataBind();

                //close the connection
                myConnect.Close();
            }

            //else record does not exist
            else
            {
                lblnoresult.Visible = true;
            }
        }
    }
コード例 #22
0
ファイル: zjl.aspx.cs プロジェクト: 262734254/OA
    private void LoadSource()
    {
        int count = 0;

        DataSet   dsDT = m_IndexBLL.GetList("[typeId]=8 and del=0 and IsDel=0 ORDER BY [setDate] DESC");
        DataTable dtDT = dsDT.Tables[0].Clone();

        /*
         * for (int i = 0; i < dsDT.Tables[0].Rows.Count; i++)
         * {
         *  if (count >= 8)
         *      break;
         *  if (m_UserLogin.LoginID.ToString().Trim() == dsDT.Tables[0].Rows[i]["userId"].ToString().Trim())
         *  {
         *      dtDT.Rows.Add(dsDT.Tables[0].Rows[i].ItemArray);
         *      count++;
         *      continue;
         *  }
         *  if (null != dsDT.Tables[0].Rows[i]["readUser"] && dsDT.Tables[0].Rows[i]["readUser"] != DBNull.Value)
         *  {
         *      string[] str = dsDT.Tables[0].Rows[i]["readUser"].ToString().Split(new Char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
         *      for (int j = 0; j < str.Length; j++)
         *      {
         *          if (m_UserLogin.LoginID.ToString().Trim() == str[j])
         *          {
         *              dtDT.Rows.Add(dsDT.Tables[0].Rows[i].ItemArray);
         *              count++;
         *              break;
         *          }
         *      }
         *  }
         * }*/
        Repeater1.DataSource = dtDT;
        Repeater1.DataBind();

        count = 0;
        DataSet   dsWX = m_IndexBLL.GetList("[typeId]=9 and del=0 and IsDel=0 ORDER BY [setDate] DESC");
        DataTable dtWX = dsWX.Tables[0].Clone();

        /*
         * for (int i = 0; i < dsWX.Tables[0].Rows.Count; i++)
         * {
         *  if (count >= 8)
         *      break;
         *  if (m_UserLogin.LoginID.ToString().Trim() == dsWX.Tables[0].Rows[i]["userId"].ToString().Trim())
         *  {
         *      dtWX.Rows.Add(dsWX.Tables[0].Rows[i].ItemArray);
         *      count++;
         *      continue;
         *  }
         *  if (null != dsWX.Tables[0].Rows[i]["readUser"] && dsWX.Tables[0].Rows[i]["readUser"] != DBNull.Value)
         *  {
         *      string[] str = dsWX.Tables[0].Rows[i]["readUser"].ToString().Split(new Char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
         *      for (int j = 0; j < str.Length; j++)
         *      {
         *          if (m_UserLogin.LoginID.ToString().Trim() == str[j])
         *          {
         *              dtWX.Rows.Add(dsWX.Tables[0].Rows[i].ItemArray);
         *              count++;
         *              break;
         *          }
         *      }
         *  }
         * }*/
        Repeater2.DataSource = dtWX;
        Repeater2.DataBind();

        count = 0;
        DataSet   dsBZ = m_IndexBLL.GetList("[typeId]=10 and del=0 and IsDel=0 ORDER BY [setDate] DESC");
        DataTable dtBZ = dsBZ.Tables[0].Clone();

        /*
         * for (int i = 0; i < dsBZ.Tables[0].Rows.Count; i++)
         * {
         *  if (count >= 8)
         *      break;
         *  if (m_UserLogin.LoginID.ToString().Trim() == dsBZ.Tables[0].Rows[i]["userId"].ToString().Trim())
         *  {
         *      dtBZ.Rows.Add(dsBZ.Tables[0].Rows[i].ItemArray);
         *      count++;
         *      continue;
         *  }
         *  if (null != dsBZ.Tables[0].Rows[i]["readUser"] && dsBZ.Tables[0].Rows[i]["readUser"] != DBNull.Value)
         *  {
         *      string[] str = dsBZ.Tables[0].Rows[i]["readUser"].ToString().Split(new Char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
         *      for (int j = 0; j < str.Length; j++)
         *      {
         *          if (m_UserLogin.LoginID.ToString().Trim() == str[j])
         *          {
         *              dtBZ.Rows.Add(dsBZ.Tables[0].Rows[i].ItemArray);
         *              count++;
         *              break;
         *          }
         *      }
         *  }
         * }*/
        Repeater3.DataSource = dtBZ;
        Repeater3.DataBind();

        count = 0;
        DataSet   dsXC = m_IndexBLL.GetList("[typeId]=11 and del=0 and IsDel=0 ORDER BY [setDate] DESC");
        DataTable dtXC = dsXC.Tables[0].Clone();

        /*
         * for (int i = 0; i < dsBZ.Tables[0].Rows.Count; i++)
         * {
         *  if (count >= 8)
         *      break;
         *  if (m_UserLogin.LoginID.ToString().Trim() == dsXC.Tables[0].Rows[i]["userId"].ToString().Trim())
         *  {
         *      dtXC.Rows.Add(dsXC.Tables[0].Rows[i].ItemArray);
         *      count++;
         *      continue;
         *  }
         *  if (null != dsXC.Tables[0].Rows[i]["readUser"] && dsXC.Tables[0].Rows[i]["readUser"] != DBNull.Value)
         *  {
         *      string[] str = dsXC.Tables[0].Rows[i]["readUser"].ToString().Split(new Char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
         *      for (int j = 0; j < str.Length; j++)
         *      {
         *          if (m_UserLogin.LoginID.ToString().Trim() == str[j])
         *          {
         *              dtXC.Rows.Add(dsXC.Tables[0].Rows[i].ItemArray);
         *              count++;
         *              break;
         *          }
         *      }
         *  }
         * }*/
        Repeater4.DataSource = dtXC;
        Repeater4.DataBind();

        count = 0;
        DataSet   dsHT = m_IndexBLL.GetList("[typeId]=162 and del=0 and IsDel=0 ORDER BY [setDate] DESC");
        DataTable dtHT = dsXC.Tables[0].Clone();

        /*
         * for (int i = 0; i < dsHT.Tables[0].Rows.Count; i++)
         * {
         *  if (count >= 8)
         *      break;
         *  if (m_UserLogin.LoginID.ToString().Trim() == dsHT.Tables[0].Rows[i]["userId"].ToString().Trim())
         *  {
         *      dtHT.Rows.Add(dsHT.Tables[0].Rows[i].ItemArray);
         *      count++;
         *      continue;
         *  }
         *  if (null != dsHT.Tables[0].Rows[i]["readUser"] && dsHT.Tables[0].Rows[i]["readUser"] != DBNull.Value)
         *  {
         *      string[] str = dsHT.Tables[0].Rows[i]["readUser"].ToString().Split(new Char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
         *      for (int j = 0; j < str.Length; j++)
         *      {
         *          if (m_UserLogin.LoginID.ToString().Trim() == str[j])
         *          {
         *              dtHT.Rows.Add(dsHT.Tables[0].Rows[i].ItemArray);
         *              count++;
         *              break;
         *          }
         *      }
         *  }
         * }
         */
        Repeater5.DataSource = dtHT;
        Repeater5.DataBind();
    }
コード例 #23
0
        void HTMLYukle(DataSet ds, string ono)
        {
            DataRow r = null, r_puan = null;

            DataRow[] r_konu = null;
            try
            {
                r      = ds.Tables["Net"].Select("ONO=" + ono)[0];
                r_puan = ds.Tables["Puan"].Select("OTONO=" + r["OTONO"].ToString())[0];
                r_konu = ds.Tables["Konu"].Select("ONO=" + ono);
                Repeater1.DataSource = r_konu.CopyToDataTable();
                Repeater1.DataBind();
            }
            catch (Exception ex)
            {
                if (ex is IndexOutOfRangeException)
                {
                    if (!ClientScript.IsStartupScriptRegistered("alert"))
                    {
                        Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('Öğrenci No Kayıtlı Değil !!!');", true);
                        TextBox1.Text = "";
                    }
                }
                else
                {
                    Hata.Bildir(ex);
                }

                return;
            }


            //doğrular
            tr_d.InnerText  = r["B1_TUR_D"].ToString();
            tar_d.InnerText = r["B1_TAR_D"].ToString();
            cog_d.InnerText = r["B1_COG_D"].ToString();
            fel_d.InnerText = r["B1_FEL_D"].ToString();

            cbr_d.InnerText = r["B1_CEB_D"].ToString();
            //geo_d.InnerText = r["B1_GEO_D"].ToString();

            fiz_d.InnerText = r["B1_FIZ_D"].ToString();
            kim_d.InnerText = r["B1_KIM_D"].ToString();
            biy_d.InnerText = r["B1_BIY_D"].ToString();

            //yanlışlar
            tr_y.InnerText  = r["B1_TUR_Y"].ToString();
            tar_y.InnerText = r["B1_TAR_Y"].ToString();
            cog_y.InnerText = r["B1_COG_Y"].ToString();
            fel_y.InnerText = r["B1_FEL_Y"].ToString();

            cbr_y.InnerText = r["B1_CEB_Y"].ToString();
            // geo_y.InnerText = r["B1_GEO_Y"].ToString();

            fiz_y.InnerText = r["B1_FIZ_Y"].ToString();
            kim_y.InnerText = r["B1_KIM_Y"].ToString();
            biy_y.InnerText = r["B1_BIY_Y"].ToString();

            //netler
            tr_n.InnerText  = r["B1_TUR_N"].ToString();
            tar_n.InnerText = r["B1_TAR_N"].ToString();
            cog_n.InnerText = r["B1_COG_N"].ToString();
            fel_n.InnerText = r["B1_FEL_N"].ToString();

            cbr_n.InnerText = r["B1_CEB_N"].ToString();
            // geo_n.InnerText = r["B1_GEO_N"].ToString();

            fiz_n.InnerText = r["B1_FIZ_N"].ToString();
            kim_n.InnerText = r["B1_KIM_N"].ToString();
            biy_n.InnerText = r["B1_BIY_N"].ToString();

            //toplam netler
            tplm_n.InnerText = r["TOPNET"].ToString();

            //Cevaplar

            tr_dc.InnerText = r["TUR1DC"].ToString();
            tr_oc.InnerText = r["TUR1OC"].ToString();

            mat_dc.InnerText = r["MAT1DC"].ToString();
            mat_oc.InnerText = r["MAT1OC"].ToString();

            fen_dc.InnerText = r["FEN1DC"].ToString();
            fen_oc.InnerText = r["FEN1OC"].ToString();

            sos_dc.InnerText = r["SOS1DC"].ToString();
            sos_oc.InnerText = r["SOS1OC"].ToString();

            //puanlar

            ygs1.InnerText = r_puan["YGS12P"].ToString();
            ygs3.InnerText = r_puan["YGS34P"].ToString();
            ygs5.InnerText = r_puan["YGS56P"].ToString();

            //konular

            //Açıklamalar
            no.InnerText       = r["ONO"].ToString();
            ad.InnerText       = r["ADI"].ToString();
            sinif.InnerText    = r["SINIFI"].ToString();
            kitacik.InnerText  = r["KITAPCIK"].ToString();
            tarih.InnerText    = r["TARIHI"].ToString();
            aciklama.InnerText = r["ACIKLAMA"].ToString();
        }
コード例 #24
0
        private void PrintInvoiceRpt(String HeadIdno, Int64 year, Int64 city)
        {
            DataSet CompDetl = SqlHelper.ExecuteDataset(ApplicationFunction.ConnectionString(), CommandType.Text, "select * from tblcompmast");

            lblCompName.Text = lblsign.Text = Convert.ToString(CompDetl.Tables[0].Rows[0]["Comp_Name"]);
            lbltr.Text       = Convert.ToString(CompDetl.Tables[0].Rows[0]["Adress1"]);
            lbladdr.Text     = Convert.ToString(CompDetl.Tables[0].Rows[0]["Adress2"]);
            lblemail.Text    = Convert.ToString(CompDetl.Tables[0].Rows[0]["Comp_Mail"]);
            lblpin.Text      = Convert.ToString(CompDetl.Tables[0].Rows[0]["Pin_No"]);
            lblmob.Text      = Convert.ToString(CompDetl.Tables[0].Rows[0]["Phone_Off"]);
            string               Stat   = Convert.ToString(CompDetl.Tables[0].Rows[0]["State_Idno"]);
            DataSet              ds2    = new DataSet();
            DataSet              dsMain = new DataSet();
            InvoiceDetailsDAL    obj    = new InvoiceDetailsDAL();
            ManageInvoiceDetails MI     = new ManageInvoiceDetails();
            Int64  fromCity             = city;
            Int64  year_idno            = year;
            String InvoiceNo            = HeadIdno;

            string Value = InvoiceNo;

            string[] Array1 = Value.Split(new char[] { ',' });
            for (int i = 0; i < Array1.Length; i++)
            {
                ds2 = obj.Report(year_idno, Array1[i], fromCity, ApplicationFunction.ConnectionString());

                if (i == 0)
                {
                    dsMain = ds2;
                }
                else
                {
                    dsMain.Tables[0].Merge(ds2.Tables[0]);
                }
            }

            if (dsMain != null && dsMain.Tables[0].Rows.Count > 0)
            {
                Repeater1.DataSource = dsMain.Tables[0];
                Repeater1.DataBind();

                lblcomp.Text = Convert.ToString(ds2.Tables[0].Rows[0]["Acnt_Name"]);
                lbladd.Text  = Convert.ToString(ds2.Tables[0].Rows[0]["Address1"]);
                lbldate.Text = Convert.ToDateTime(ds2.Tables[0].Rows[0]["Inv_Date"]).ToString("dd-MM-yyyy");
                lblbill.Text = Session["InvoiceNo"] as String;
                string acntstateid = Convert.ToString(ds2.Tables[0].Rows[0]["State_Idno"]);
                double total       = Convert.ToDouble(lbltotal.Text);

                if (Stat == acntstateid)
                {
                    lblbillamnt.Text = total.ToString("N2");
                    lblsgstamnt.Text = string.Format("{0:0,0.00}", Convert.ToDouble(dsMain.Tables[0].Rows[0]["SGST_Amt"].ToString()));
                    lblcgstamnt.Text = string.Format("{0:0,0.00}", Convert.ToDouble(dsMain.Tables[0].Rows[0]["CGST_Amt"].ToString()));

                    lblsgstper.Text  = "SGST " + Convert.ToDouble(dsMain.Tables[0].Rows[0]["SGST_Per"].ToString()) + " %";
                    lblcgstper.Text  = "CGST " + Convert.ToDouble(dsMain.Tables[0].Rows[0]["CGST_Per"].ToString()) + " %";
                    lbligstper.Text  = "IGST " + Convert.ToDouble(dsMain.Tables[0].Rows[0]["IGST_Per"].ToString()) + " %";
                    lbligstamnt.Text = "0.00";

                    double sgst        = Convert.ToDouble(lblsgstamnt.Text);
                    double cgst        = Convert.ToDouble(lblcgstamnt.Text);
                    double TotalAmount = Convert.ToDouble(total + sgst + cgst);
                    lblTotalAmount.Text = TotalAmount.ToString("N2");
                    string[] str1        = TotalAmount.ToString().Split('.');
                    string   numbertoent = NumberToText(Convert.ToInt32(str1[0]));
                    lblword.Text   = numbertoent + " Only";
                    trigst.Visible = false;
                }
                else
                {
                    lblbillamnt.Text = total.ToString("N2");
                    lblsgstper.Text  = "SGST " + Convert.ToDouble(dsMain.Tables[0].Rows[0]["SGST_Per"].ToString()) + " %";
                    lblcgstper.Text  = "CGST " + Convert.ToDouble(dsMain.Tables[0].Rows[0]["CGST_Per"].ToString()) + " %";
                    lblsgstamnt.Text = "0.00";
                    lblcgstamnt.Text = "0.00";
                    lbligstamnt.Text = string.Format("{0:0,0.00}", Convert.ToDouble(dsMain.Tables[0].Rows[0]["IGST_Amt"].ToString()));
                    lbligstper.Text  = "IGST " + Convert.ToDouble(dsMain.Tables[0].Rows[0]["IGST_Per"].ToString()) + " %";
                    double igst        = Convert.ToDouble(lbligstamnt.Text);
                    double TotalAmount = Convert.ToDouble(total + igst);
                    lblTotalAmount.Text = TotalAmount.ToString("N2");
                    string[] str1        = TotalAmount.ToString().Split('.');
                    string   numbertoent = NumberToText(Convert.ToInt32(str1[0]));
                    lblword.Text   = numbertoent + " Only";
                    trsgst.Visible = false;
                    trcgst.Visible = false;
                }
            }
        }
コード例 #25
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Button1.Visible = false;
            try
            {
                if (!Page.IsPostBack)
                {
                    //HVEStage_Search_Service_Application_LinksStoreDB_ac061569c0804ca68d18ac6f23bb2758
                    //HVEDev_Search_Service_Application_LinksStoreDB_151f333c38ce4fd3a6527d79d5532774
                    string quer = @"Select top 10
                                      querystring, COUNT(queryString) as CountValue
	                                  from  [HVEDev_Search_Service_Application_LinksStoreDB_151f333c38ce4fd3a6527d79d5532774].[dbo].[MSSQLogPageImpressionQuery]
	                                  where queryString !='' 
			                                and queryString IS NOT NULL 
											and queryString not like 'path:%'                                          
			                                and queryString not like 'siteid:%'  
	                                  group by queryString
                                      order by CountValue desc";
                    //HVE.Files.dbConnection conn = new HVE.Files.dbConnection("TopSearchedItems");
                    HVE.Files.dbConnection conn = new HVE.Files.dbConnection();
                    DataTable tempTabale        = null;
                    tempTabale = conn.executeSelectNoParameter(quer);

                    Repeater1.DataSource = tempTabale;
                    Repeater1.DataBind();

                    #region GridView Bound Columns

                    //////DataTable dt = new DataTable();
                    //////for (int i = 0; i < tempTabale.Rows.Count; i++)
                    //////{
                    //////    DataColumn dcol = new DataColumn("Col" + (i + 1), typeof(System.String));
                    //////    dcol.AutoIncrement = true;
                    //////    dt.Columns.Add(dcol);
                    //////}
                    //////DataRow drow = dt.NewRow();
                    ////////drow["Col1"] = 1;// "Row-";
                    //////dt.Rows.Add(drow);
                    ////////GridView1.DataSource = dt;
                    ////////GridView1.DataBind();



                    #endregion

                    #region LiteralControl
                    StringBuilder htmlStr = new StringBuilder("");
                    //string hrefLinks = "http://win-njfp7te48bn/sites/HVEDev3Search/Pages/search.aspx?k=";
                    string hrefLinks = this.Page.Request.Url.ToString().Substring(0, this.Page.Request.Url.ToString().IndexOf(".aspx?k=")) + ".aspx?k=";


                    string str  = SPContext.Current.Site.Url;
                    string str1 = this.Page.Request.Url.ToString();
                    string var1 = str1.Substring(0, str1.IndexOf(".aspx?k="));


                    //string var1 = str1.Substring(str1.LastIndexOf(".aspx?k="));

                    /*
                     * var1 = entry.DocLocation.Substring(entry.DocLocation.LastIndexOf("/"));
                     *                              var2 = var1.Substring(var1.LastIndexOf("/"));
                     *                              var3 = var2.Substring(1);
                     *                              var4 = var3.Substring(var3.LastIndexOf('.') + 1);
                     */

                    for (int i = 0; i < tempTabale.Rows.Count; i++)
                    {
                        //htmlStr.Append("<table><tr></tr></table>");
                        switch (i)
                        {
                        case 0:
                            string hyperLink1 = hrefLinks + tempTabale.Rows[i][0];
                            htmlStr.Append("<span style='font-size:xx-large; '><a href='" + hyperLink1 + "' title='" + tempTabale.Rows[i][0] + "' >" + tempTabale.Rows[i][0] + "</a></span>");
                            htmlStr.Append(" | ");
                            htmlStr.Append("&nbsp");
                            break;

                        case 1:
                            string hyperLink2 = hrefLinks + tempTabale.Rows[i][0];
                            htmlStr.Append("<span style='font-size:x-large; '><a href='" + hyperLink2 + "' title='" + tempTabale.Rows[i][0] + "' >" + tempTabale.Rows[i][0] + "</a></span>");
                            htmlStr.Append(" | ");
                            htmlStr.Append("&nbsp");
                            break;

                        case 2:
                            string hyperLink3 = hrefLinks + tempTabale.Rows[i][0];
                            htmlStr.Append("<span style='font-size:large; '><a href='" + hyperLink3 + "' title='" + tempTabale.Rows[i][0] + "' >" + tempTabale.Rows[i][0] + "</a></span>");
                            htmlStr.Append(" | ");
                            htmlStr.Append("&nbsp");
                            break;

                        case 3:
                            string hyperLink4 = hrefLinks + tempTabale.Rows[i][0];
                            htmlStr.Append("<span style='font-size:large; '><a href='" + hyperLink4 + "' title='" + tempTabale.Rows[i][0] + "' >" + tempTabale.Rows[i][0] + "</a></span>");
                            htmlStr.Append(" | ");
                            htmlStr.Append("&nbsp");
                            break;

                        case 4:
                            string hyperLink5 = hrefLinks + tempTabale.Rows[i][0];
                            htmlStr.Append("<span style='font-size:larger; '><a href='" + hyperLink5 + "' title='" + tempTabale.Rows[i][0] + "' >" + tempTabale.Rows[i][0] + "</a></span>");
                            htmlStr.Append(" | ");
                            htmlStr.Append("&nbsp");
                            break;

                        case 5:
                            string hyperLink6 = hrefLinks + tempTabale.Rows[i][0];
                            htmlStr.Append("<span style='font-size:medium; '><a href='" + hyperLink6 + "' title='" + tempTabale.Rows[i][0] + "' >" + tempTabale.Rows[i][0] + "</a></span>");
                            htmlStr.Append(" | ");
                            htmlStr.Append("&nbsp");
                            break;

                        case 6:
                            string hyperLink7 = hrefLinks + tempTabale.Rows[i][0];
                            htmlStr.Append("<span style='font-size:small; '><a href='" + hyperLink7 + "' title='" + tempTabale.Rows[i][0] + "' >" + tempTabale.Rows[i][0] + "</a></span>");
                            htmlStr.Append(" | ");
                            htmlStr.Append("&nbsp");
                            break;

                        case 7:
                            string hyperLink8 = hrefLinks + tempTabale.Rows[i][0];
                            htmlStr.Append("<span style='font-size:small; '><a href='" + hyperLink8 + "' title='" + tempTabale.Rows[i][0] + "' >" + tempTabale.Rows[i][0] + "</a></span>");
                            htmlStr.Append(" | ");
                            htmlStr.Append("&nbsp");
                            break;

                        case 8:
                            string hyperLink9 = hrefLinks + tempTabale.Rows[i][0];
                            htmlStr.Append("<span style='font-size:smaller; '><a href='" + hyperLink9 + "' title='" + tempTabale.Rows[i][0] + "' >" + tempTabale.Rows[i][0] + "</a></span>");
                            htmlStr.Append(" | ");
                            htmlStr.Append("&nbsp");
                            break;

                        case 9:
                            string hyperLink10 = hrefLinks + tempTabale.Rows[i][0];
                            htmlStr.Append("<span style='font-size:smaller; '><a href='" + hyperLink10 + "' title='" + tempTabale.Rows[i][0] + "' >" + tempTabale.Rows[i][0] + "</a></span>");
                            htmlStr.Append("&nbsp");
                            break;

                        default:
                            Console.WriteLine("Default case");
                            break;
                        }
                    }
                    LiteralText.Text = htmlStr.ToString();
                }
                #endregion
            }
            catch (System.Exception excep)
            {
                Label1.Text += excep.Message;
            }
        }
コード例 #26
0
    protected void Page_Load(object sender, EventArgs e)
    {
        LoginCheck.AdManage(5);
        if (!IsPostBack)
        {
            string uid     = Session["userid"].ToString();
            string s_name2 = Session["AdminManage"].ToString();


            Int64 lb_id = Convert.ToInt64(Request.QueryString["id"].ToString());
            //int lb_id = int.Parse();
            string  sql = "select cp_set,cp_umun,Posttime from tb_U_Cplist where cp_id=" + lb_id;
            DataSet ds  = HXD.DBUtility.SQLHelper.ExecuteDataset(sql);
            if (ds.Tables[0].Rows.Count > 0)
            {
                int    csid = int.Parse(ds.Tables[0].Rows[0]["cp_set"].ToString());
                string sql2 = "select Fpapername from t_exam_paper where Fpaperid in (" + csid + ")";
                lb_name = HXD.DBUtility.SQLHelper.ExecuteScalar(sql2).ToString();
                sc_name = "量表:" + lb_name;
                sc_note = "发布时间:" + ds.Tables[0].Rows[0]["Posttime"].ToString();
                c_ls    = ds.Tables[0].Rows[0]["cp_umun"].ToString();//总人数

                string sql_res = "select count(id) from t_exam_results where wid='" + lb_id + "'";
                int    num_c   = int.Parse(HXD.DBUtility.SQLHelper.ExecuteScalar(sql_res).ToString());//已测评人数
                c_xs = num_c.ToString();

                int    a       = num_c;
                int    b       = int.Parse(c_ls);
                double percent = (double)a / b;
                c_cp   = percent.ToString("0.0%"); //完成率
                fscore = 0;                        //预警分数
                double yzscore   = 0;
                double yzscore_h = 0;

                switch (csid)
                {
                case 1:
                    fscore  = 160;
                    yzscore = 2.0;
                    break;

                case 93:
                    fscore    = 65;
                    yzscore   = 8;
                    yzscore_h = 10;
                    break;

                default:
                    break;
                }


                string sql_160 = "select COUNT(id) from t_exam_results where wid='" + lb_id + "' and Fscore>='" + fscore + "'";
                s_Fscore4 = HXD.DBUtility.SQLHelper.ExecuteScalar(sql_160).ToString(); //预警
                string sql_150 = "select COUNT(id) from t_exam_results where wid='" + lb_id + "' and Fscore<'" + fscore + "'";
                s_Fscore2 = HXD.DBUtility.SQLHelper.ExecuteScalar(sql_150).ToString(); //正常

                //string sql22 = "select * from t_exam_subitems where Fpaperid='" + csid + "'";
                //DataSet dsa = HXD.DBUtility.SQLHelper.ExecuteDataset(sql22);

                //if (dsa.Tables[0].Rows.Count > 0)//判断是否有因子
                //{

                //    for (int i = 0; i < dsa.Tables[0].Rows.Count; i++)
                //    {
                //        int Fsubitemid = int.Parse(dsa.Tables[0].Rows[i]["Fsubitemid"].ToString());
                //        string fsname = dsa.Tables[0].Rows[i]["Fsubitemname"].ToString();
                //        string sqla = "select count(distinct Fresultid)  from t_exam_subitems_score where Fsubitemid='" + Fsubitemid + "' and [Fscore] >='" + yzscore + "' and [wid] ='" + lb_id + "'";
                //        string sqlb = "select count(distinct Fresultid)  from t_exam_subitems_score where Fsubitemid='" + Fsubitemid + "' and [Fscore] <'" + yzscore + "' and [wid] ='" + lb_id + "'";
                //        string a_score = HXD.DBUtility.SQLHelper.ExecuteScalar(sqla).ToString();
                //        string b_score = HXD.DBUtility.SQLHelper.ExecuteScalar(sqlb).ToString();
                //        s_count += "<div class=\"row\"><div class=\"am-u-md-6 am-u-sm-12 row-mb\"><div class=\"tpl-portlet\"><div class=\"tpl-portlet-title\"><div class=\"tpl-caption font-green \"><i class=\"am-icon-cloud-download\"></i>";
                //        s_count += "<span> 因子:" + fsname + "结果汇总</span></div><div class=\"actions\"><ul class=\"actions-btn\"></ul></div></div>";
                //        s_count += "<div class=\"tpl-echarts\" id=\"sl_main" + i + "\"></div>";
                //        s_count += "<script type=\"text/javascript\">";
                //        s_count += "var myChart = echarts.init(document.getElementById('sl_main" + i + "'));";
                //        s_count += " option = {";
                //        s_count += "title: {";
                //        s_count += "text: '" + lb_name + "-" + fsname + "',";
                //        s_count += "subtext: '',";
                //        s_count += "x: 'center'";
                //        s_count += "},";
                //        s_count += "tooltip: {";
                //        s_count += "trigger: 'item', color: ['green', 'red'],";
                //        s_count += "formatter: \"{a} <br/>{b} : {c} ({d}%)\"";
                //        s_count += "},";
                //        s_count += "legend: {";
                //        s_count += "orient: 'vertical',";
                //        s_count += "left: 'left',";
                //        s_count += "data: ['" + fsname + ">=" + yzscore + "', '" + fsname + "<" + yzscore + "']";
                //        s_count += "},";
                //        s_count += "series: [";
                //        s_count += "{";
                //        s_count += "name: '测评结果',";
                //        s_count += " type: 'pie',";
                //        s_count += "radius: '55%',";
                //        s_count += "center: ['50%', '60%'],";
                //        s_count += "data: [";
                //        s_count += "{ value: " + a_score + ", name: '" + fsname + ">=" + yzscore + "' },{ value:" + b_score + ", name: '" + fsname + "<" + yzscore + "' }";
                //        s_count += " ],";
                //        s_count += "itemStyle: {";
                //        s_count += "emphasis: {";
                //        s_count += "shadowBlur: 10,";
                //        s_count += "shadowOffsetX: 0,";
                //        s_count += "shadowColor: 'rgba(223,42,27, 0.5)'}}}]};";
                //        s_count += "myChart.setOption(option);</script>";



                //        s_count += "</div></div>";
                //        s_count += "<div class=\"am-u-md-6 am-u-sm-12 row-mb\"><div class=\"tpl-portlet\"><div class=\"tpl-portlet-title\"><div class=\"tpl-caption font-red \"><i class=\"am-icon-bar-chart\"></i><span> 需干预学生资料</span></div>";
                //        s_count += "<div class=\"actions\"><ul class=\"actions-btn\"><li class=\"green\"></li></ul></div></div>";
                //        //s_count += "<div class=\"actions\"><ul class=\"actions-btn\"><li class=\"green\"><a href=\"font_list3.aspx?Fsubitemid=" + Fsubitemid + "&Fscore=" + yzscore + "&wid=" + lb_id + "\">更多</a></li></ul></div></div>";
                //        s_count += "<div class=\"tpl-scrollable\">";

                //        s_count += "<table class=\"am-table tpl-table\">";
                //        s_count += "<thead><tr class=\"tpl-table-uppercase\"><th>测试人</th><th>总分</th><th>" + fsname + "得分</th><th>测试时间</th><th>操作</th></tr></thead><tbody>";
                //        //string sqla = "select count(distinct Fresultid)  from t_exam_subitems_score where Fsubitemid='" + Fsubitemid + "' and [Fscore] >='" + yzscore + "' and [wid] ='" + lb_id + "'";
                //        string sqlc = "select top 8 id,FstudentNo,Fscore,posttime from t_exam_results where [Fresultid] in(select distinct Fresultid  from t_exam_subitems_score where Fsubitemid='" + Fsubitemid + "' and [Fscore] >='" + yzscore + "' and [wid] ='" + lb_id + "')";
                //        DataSet dsc = HXD.DBUtility.SQLHelper.ExecuteDataset(sqlc);
                //        for (int ii = 0; ii < dsc.Tables[0].Rows.Count; ii++)
                //        {
                //            s_count += "<tr><td>";
                //            s_count += "<img src=\"assets/img/user01.png\" alt=\"\" class=\"user-pic\">";
                //            s_count += "<a class=\"user-name\" href=\"###\">" + getname(dsc.Tables[0].Rows[ii]["FstudentNo"].ToString()) + "</a></td>";
                //            s_count += "<td class=\"font-green \">" + dsc.Tables[0].Rows[ii]["Fscore"].ToString() + "</td>";
                //            s_count += "<td class=\"font-red \">" + getscore(dsc.Tables[0].Rows[ii]["FstudentNo"].ToString(), Fsubitemid.ToString(), lb_id.ToString()) + "</td>";
                //            s_count += "<td>" + dsc.Tables[0].Rows[ii]["posttime"].ToString() + "</td><td>";
                //            s_count += "<a class=\"user-name\" href=\"/user/chart_scl.aspx?rid=" + dsc.Tables[0].Rows[ii]["id"].ToString() + "&Action=lock\">查看</a></td></tr>";
                //        }
                //        s_count += "</tbody></table></div></div></div></div>";

                //    }
                //}

                s_url = "<a href=\"font_list3.aspx?Fsubitemid=" + csid + "&Fscore=" + fscore + "&wid=" + lb_id + "\">更多</a>";

                string sqldb = "select top 8 FstudentNo,Fscore,posttime,id from t_exam_results where Fscore>='" + fscore + "' and wid='" + lb_id + "' order by id desc";
                Repeater1.DataSource = HXD.DBUtility.SQLHelper.ExecuteDataset(sqldb);
                Repeater1.DataBind();
            }
            else
            {
            }
        }
    }
コード例 #27
0
        void GetUserDetail()
        {
            string email = ApplicationSession.Current.user.Email;

            UserBO.GetUserDatail(email);
            lName.InnerText          = ApplicationSession.Current.user.Name;
            lEmail.InnerText         = ApplicationSession.Current.user.Email;
            lMobile.InnerText        = ApplicationSession.Current.user.Mobile;
            lQualification.InnerText = ApplicationSession.Current.user.Qualification;
            lInstitute.InnerText     = ApplicationSession.Current.user.Institute;
            lMarks.InnerText         = ApplicationSession.Current.user.Marks;
            lCity.InnerText          = ApplicationSession.Current.user.Add.City;
            //lLocation.InnerText = ApplicationSession.Current.user.Add.Location;
            lCompany.InnerText    = ApplicationSession.Current.user.Company;
            lExp.InnerText        = ApplicationSession.Current.user.Experience;
            lAbout.InnerText      = ApplicationSession.Current.user.Query;
            lblProgress.InnerText = ApplicationSession.Current.user.ProgressBar.ToString();
            if (Convert.ToInt32(ApplicationSession.Current.user.ProgressBar.ToString().Substring(0, ApplicationSession.Current.user.ProgressBar.ToString().Length - 1)) <= 50)
            {
                progressBar.Attributes.Add("Class", "progress-bar progress-bar-danger");
            }
            else if (Convert.ToInt32(ApplicationSession.Current.user.ProgressBar.ToString().Substring(0, ApplicationSession.Current.user.ProgressBar.ToString().Length - 1)) == 100)
            {
                progressBar.Attributes.Add("Class", "progress-bar progress-bar-success");
            }
            //User Plan
            if (ApplicationSession.Current.user.UserPricingPlan != null)
            {
                if (!string.IsNullOrEmpty(ApplicationSession.Current.user.UserPricingPlan.PlanName))
                {
                    noUserPlanTaken.Visible     = false;
                    userPlanTaken.Visible       = true;
                    lPlanName.InnerText         = ApplicationSession.Current.user.UserPricingPlan.PlanName.ToString();
                    lPlanExpireDate.InnerText   = ApplicationSession.Current.user.UserPricingPlan.PlanExpireDate.ToString();
                    lReferralsLeft.InnerText    = ApplicationSession.Current.user.UserPricingPlan.ReferralsLeft.ToString();
                    lJobsAppliedCount.InnerText = ApplicationSession.Current.user.UserPricingPlan.JobsAppliedCount.ToString();
                }
                else
                {
                    userPlanTaken.Visible   = false;
                    noUserPlanTaken.Visible = true;
                }
            }
            else
            {
                userPlanTaken.Visible   = false;
                noUserPlanTaken.Visible = true;
            }
            //User Plan
            if (ApplicationSession.Current.user.ResumeSubmitted.ToString() == "Y")
            {
                lUploadResume.InnerText = ApplicationSession.Current.user.ResumePath.ToString().Substring(ApplicationSession.Current.user.ResumePath.ToString().LastIndexOf("_") + 1);
            }
            string fileName = Server.MapPath(System.Configuration.ConfigurationManager.AppSettings["FileSavePath"].ToString()) + "Resume" +
                              ApplicationSession.Current.user.ResumePath.ToString();

            if (File.Exists(fileName))
            {
                resumeUpLoaded.Text = ApplicationSession.Current.user.ResumePath.ToString().Substring(ApplicationSession.Current.user.ResumePath.ToString().IndexOf("/") + 1);
            }
            progressBar.Style.Add("width", lblProgress.InnerText);
            jobAppliedCount.Text = ApplicationSession.Current.user.AppliedJobs.Count.ToString();
            // jobAppliedCount.Style.Add("class", "label label-primary");
            if (ApplicationSession.Current.user.AppliedJobs.Count > 0)
            {
                jobAppliedWarning.Visible = false;
                Repeater1.Visible         = true;
                Repeater1.DataSource      = ApplicationSession.Current.user.AppliedJobs;
                Repeater1.DataBind();
            }
            else
            {
                jobAppliedWarning.Visible = true;
                Repeater1.Visible         = false;
            }
            if (ApplicationSession.Current.user.PostedJobs.Count > 0)
            {
                Repeater2.Visible = true;

                Repeater2.DataSource = ApplicationSession.Current.user.PostedJobs;
                Repeater2.DataBind();
            }
            else
            {
                Repeater2.Visible = false;
            }
            showProfile.Visible = true;
            editProfie.Visible  = false;
            btnEdit.Visible     = true;
            btnSubmit.Visible   = false;

            //MakeControlsReadable();
        }
コード例 #28
0
 protected void Page_Load(object sender, EventArgs e)
 {
     DataSetTableAdapters.tblDuyurularTableAdapter dt = new DataSetTableAdapters.tblDuyurularTableAdapter();
     Repeater1.DataSource = dt.OgrenciDuyuruListesi();
     Repeater1.DataBind();
 }
コード例 #29
0
    public void PageBind2()
    {
        PageBase pb = new PageBase();

        pb.TblName       = "Tunnel_Index";
        pb.FldName       = "id";
        pb.ProcedureName = "pagination";
        pb.PageSize      = pageSize;
        if (cuttentPage == 0)
        {
            cuttentPage = pb.PageIndex;
        }
        pb.PageIndex = cuttentPage;
        int count = 0;

        pb.DoCount = 1;
        if (where.Length > 0)
        {
            if (TextBox1.Text.Trim() != "")
            {
                key += " and Title like '%" + TextBox1.Text + "%'";
            }
        }
        else
        {
            if (TextBox1.Text.Trim() != "")
            {
                key += " Title like '%" + TextBox1.Text + "%'";
            }
            else
            {
                key += " 1=1";
            }
        }
        //if (TextBox1.Text.Trim()!="")
        //    key += " and Title like ''%" + TextBox1.Text + "%''";
        //else
        //    key += " 1=1";
        //if (where.Length > 0)
        //{
        //    key += " and Title like ''%" + TextBox1.Text + "%''";
        //    //and typeid not in (1,2,4,9,19,84,85,86,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103) ";
        //}
        //else
        //{
        //    key += " 1=1 and Title like ''%" + TextBox1.Text + "%''  ";
        //    //and typeid not in (1,2,4,9,19,84,85,86,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103) ";
        //}
        where += key + " and del=0 and IsDel=0";
        if (tm.GetModel(ul.LoginID).m_bum == 131)
        {
            pb.StrWhere = where + " and (bum_bz=" + tm.GetModel(ul.LoginID).m_bum + " or bum_bz=0)";
        }
        else if (tm.GetModel(ul.LoginID).m_bum == 134)
        {
            pb.StrWhere = where + " and (bum_bz=" + tm.GetModel(ul.LoginID).m_bum + " or bum_bz=0 or bum_bz=132)";
        }
        else if (ul.JiaoSe(ul.LoginID) != "系统管理员")
        {
            pb.StrWhere = where + " and bum_bz=" + tm.GetModel(ul.LoginID).m_bum;
        }
        else
        {
            pb.StrWhere = where;
        }
        mbll.GetList(pb, ref count); //获取总条数

        pb.DoCount = 0;
        List <Tunnel.Model.Tunnel_index> modelList = new List <Tunnel.Model.Tunnel_index>();

        modelList = mbll.GetList3(pb, ref count);//获取分页结果


        //数据绑定
        Repeater1.DataSource = modelList;
        Repeater1.DataBind();

        //数据分页
        MTCPager1.PageSize    = pageSize;
        MTCPager1.RecordCount = count;
        MTCPager1.PageIndex   = cuttentPage;
        if (count <= pb.PageSize)
        {
            MTCPager1.Visible = false;
        }
        else
        {
            MTCPager1.Visible = true;
        }
    }
コード例 #30
0
        private void clear()
        {
            dpFromCity.Items.Clear();
            dpToCity.Items.Clear();
            dpAirlineName.Items.Clear();
            dpFlightName.Items.Clear();
            DropDownList1.Items.Clear();
            DropDownList2.Items.Clear();
            DropDownList4.Items.Clear();
            DropDownList5.Items.Clear();

            DropDownList1.Items.Add("None");
            DropDownList4.Items.Add("None");
            for (int i = 1; i <= 24; i++)
            {
                DropDownList1.Items.Add(i.ToString());
                DropDownList4.Items.Add(i.ToString());
            }
            DropDownList1.DataBind();
            DropDownList4.DataBind();

            DropDownList2.Items.Add("None");
            DropDownList5.Items.Add("None");
            for (int i = 0; i <= 59; i++)
            {
                DropDownList2.Items.Add(i.ToString());
                DropDownList5.Items.Add(i.ToString());
            }
            DropDownList2.DataBind();
            DropDownList5.DataBind();

            txtDuration.Enabled = false;

            txtDuration.Text  = "";
            chkStatus.Checked = false;
            ICityManager cityManager = (ICityManager)AirTravelManagerFactory.Create("City");

            try
            {
                List <City> cities = cityManager.GetCities();

                dpFromCity.Items.Add("None");
                foreach (City c in cities)
                {
                    ListItem item = new ListItem(c.Name, c.CityId.ToString());
                    dpFromCity.Items.Add(item);
                }
                dpFromCity.DataBind();

                dpToCity.Items.Add("None");
                foreach (City c in cities)
                {
                    ListItem item = new ListItem(c.Name, c.CityId.ToString());
                    dpToCity.Items.Add(item);
                }
                dpToCity.DataBind();
            }
            catch (CityManagerException e)
            {
                lblError.Text = e.Message;
            }


            IAirLineManager airlineManager = (IAirLineManager)AirTravelManagerFactory.Create("Airline");

            try
            {
                List <Airline> airlines = airlineManager.GetAirLines();

                dpAirlineName.Items.Add("None");
                foreach (Airline c in airlines)
                {
                    ListItem item = new ListItem(c.Name, c.Id.ToString());
                    dpAirlineName.Items.Add(item);
                }
                dpAirlineName.DataBind();
            }
            catch (AirlineManagerException e)
            {
                lblError.Text = e.Message;
            }

            var travelClassvalues = Enum.GetValues(typeof(TravelClass)).Cast <TravelClass>();

            Repeater1.DataSource = travelClassvalues;
            Repeater1.DataBind();
        }