public override string ToString() { string str = "{X:" + X.ToString() + ", Y:" + Y.ToString() + ", Z:" + Z.ToString() + ", XX:" + XX.ToString() + ", YY:" + YY.ToString() + ", ZZ:" + ZZ.ToString() + "}"; return("GSA Spring " + str); }
public override string ToString() { string str = System.Environment.NewLine + "X: " + X.ToString() + ", Y: " + Y.ToString() + ", Z: " + Z.ToString() + ", XX: " + XX.ToString() + ", YY: " + YY.ToString() + ", ZZ: " + ZZ.ToString(); return("GSA Bool 6" + str); }
public override int GetHashCode() { var hashCode = -987908381; hashCode = hashCode * -1521134295 + base.GetHashCode(); hashCode = hashCode * -1521134295 + x.GetHashCode(); hashCode = hashCode * -1521134295 + y.GetHashCode(); hashCode = hashCode * -1521134295 + XX.GetHashCode(); hashCode = hashCode * -1521134295 + YY.GetHashCode(); hashCode = hashCode * -1521134295 + minOfXY.GetHashCode(); hashCode = hashCode * -1521134295 + maxOfXY.GetHashCode(); return(hashCode); }
public override int GetHashCode() { int h = 17; unchecked { h = h * 23 + XX.GetHashCode(); h = h * 23 + XY.GetHashCode(); h = h * 23 + YX.GetHashCode(); h = h * 23 + YY.GetHashCode(); } return(h); }
private void getImageSize() { Single X; Single Y; Single XX; Single YY; X = adjustedImage.Width; Y = adjustedImage.Height; XX = (X / DPI) * (Single)2.54; YY = (Y / DPI) * (Single)2.54; txtWidthX.Text = X.ToString(); txtHeightY.Text = Y.ToString(); txtWidth.Text = XX.ToString(); txtHeight.Text = YY.ToString(); }
public override int GetHashCode() { int result = 17; result = 31 * result + XX.GetHashCode(); result = 31 * result + XY.GetHashCode(); result = 31 * result + XZ.GetHashCode(); result = 31 * result + YX.GetHashCode(); result = 31 * result + YY.GetHashCode(); result = 31 * result + YZ.GetHashCode(); result = 31 * result + ZX.GetHashCode(); result = 31 * result + ZY.GetHashCode(); result = 31 * result + ZZ.GetHashCode(); return(result); }
static string convertSecDateToStr(long ansInSec) { long DD, MM, YY, hh, mm, ss; YY = ansInSec / (12 * 30 * 24 * 60 * 60); ansInSec = ansInSec % (12 * 30 * 24 * 60 * 60); MM = ansInSec / (30 * 24 * 60 * 60); ansInSec = ansInSec % (30 * 24 * 60 * 60); DD = ansInSec / (24 * 60 * 60); ansInSec = ansInSec % (24 * 60 * 60); hh = ansInSec / (60 * 60); ansInSec = ansInSec % (60 * 60); mm = ansInSec / (60); ansInSec = ansInSec % (60); ss = ansInSec; return(DD.ToString() + ":" + MM.ToString() + ":" + YY.ToString() + ":" + hh.ToString() + ":" + mm.ToString() + ":" + ss.ToString()); }
//get beliefs (mariginal probabilities) public void getBeliefs(belief bel, model m, dataSeq x, List <dMatrix> YYlist, List <List <double> > Ylist) { int nNodes = x.Count; int nTag = m.NTag; //dMatrix YY = new dMatrix(nTag, nTag); double[] dAry = new double[nTag]; //List<double> Y = new List<double>(dAry); List <double> alpha_Y = new List <double>(dAry); List <double> newAlpha_Y = new List <double>(dAry);//marginal probability from left to current node (including values of the current node) List <double> tmp_Y = new List <double>(dAry); //compute beta values in a backward scan for (int i = nNodes - 1; i > 0; i--) { dMatrix YY = YYlist[i]; List <double> Y = Ylist[i]; //compute the Mi matrix //getLogYY(m, x, i, ref YY, ref Y, false, mask); listTool.listSet(ref tmp_Y, bel.belState[i]);//this is meaningful from the 2nd round listTool.listAdd(ref tmp_Y, Y); logMultiply(YY, tmp_Y, bel.belState[i - 1]); } //compute alpha values for (int i = 0; i < nNodes; i++) { dMatrix YY = null; if (i > 0) { YY = new dMatrix(YYlist[i]);//should use the copy to avoid change } List <double> Y = Ylist[i]; //compute the Mi matrix //getLogYY(m, x, i, ref YY, ref Y, false, mask); if (i > 0) { listTool.listSet(ref tmp_Y, alpha_Y);//this is meaningful from the 2nd round YY.transpose(); logMultiply(YY, tmp_Y, newAlpha_Y); listTool.listAdd(ref newAlpha_Y, Y); } else { listTool.listSet(ref newAlpha_Y, Y); } //setting marginal probability on edges if (i > 0) { //beta + Y listTool.listSet(ref tmp_Y, Y); listTool.listAdd(ref tmp_Y, bel.belState[i]); //YY YY.transpose(); bel.belEdge[i].set(YY); //belief = alpha + YY + beta + Y for (int yPre = 0; yPre < nTag; yPre++) { for (int y = 0; y < nTag; y++) { bel.belEdge[i][yPre, y] += tmp_Y[y] + alpha_Y[yPre]; } } } //setting marginal probability on nodes List <double> tmp = bel.belState[i]; //beta listTool.listAdd(ref tmp, newAlpha_Y); //belief = alpha + beta listTool.listSet(ref alpha_Y, newAlpha_Y); } double Z = logSum(alpha_Y); for (int i = 0; i < nNodes; i++) { List <double> tmp = bel.belState[i]; listTool.listAdd(ref tmp, -Z); listTool.listExp(ref tmp); } for (int i = 1; i < nNodes; i++) { bel.belEdge[i].add(-Z); bel.belEdge[i].eltExp(); } bel.Z = Z;//the overall potential function value }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { RptName = Request.QueryString["rptname"].ToString(); #region Report name Conditions if (RptName == "RptDemandSummary.rdlc") { if (Request.QueryString["FL"] != null) { FL = Request.QueryString["FL"].ToString().Replace("%27", ""); } if (Request.QueryString["FBRCD"] != null) { FBRCD = Request.QueryString["FBRCD"].ToString().Replace("%27", ""); } if (Request.QueryString["TBRCD"] != null) { TBRCD = Request.QueryString["TBRCD"].ToString().Replace("%27", ""); } if (Request.QueryString["ASONDATE"] != null) { ASONDT = Request.QueryString["ASONDATE"].ToString().Replace("%27", ""); } if (Request.QueryString["MM"] != null) { MM = Request.QueryString["MM"].ToString().Replace("%27", ""); } if (Request.QueryString["YY"] != null) { YY = Request.QueryString["YY"].ToString().Replace("%27", ""); } } if (RptName == "RptRecoveryStatement_Total.rdlc") { if (Request.QueryString["BRCD"] != null) { BRCD = Request.QueryString["BRCD"].ToString().Replace("%27", ""); } if (Request.QueryString["UID"] != null) { UID = Request.QueryString["UID"].ToString().Replace("%27", ""); } if (Request.QueryString["ASONDATE"] != null) { ASONDT = Request.QueryString["ASONDATE"].ToString().Replace("%27", ""); } if (Request.QueryString["RECDIV"] != null) { RECDIV = Request.QueryString["RECDIV"].ToString().Replace("%27", ""); } if (Request.QueryString["RECCODE"] != null) { RECCODE = Request.QueryString["RECCODE"].ToString().Replace("%27", ""); } if (Request.QueryString["MM"] != null) { MM = Request.QueryString["MM"].ToString().Replace("%27", ""); } if (Request.QueryString["YY"] != null) { YY = Request.QueryString["YY"].ToString().Replace("%27", ""); } } if (RptName == "RptDemandDetails.rdlc") { if (Request.QueryString["FL"] != null) { FL = Request.QueryString["FL"].ToString().Replace("%27", ""); } if (Request.QueryString["FBRCD"] != null) { FBRCD = Request.QueryString["FBRCD"].ToString().Replace("%27", ""); } if (Request.QueryString["TBRCD"] != null) { TBRCD = Request.QueryString["TBRCD"].ToString().Replace("%27", ""); } if (Request.QueryString["ASONDATE"] != null) { ASONDT = Request.QueryString["ASONDATE"].ToString().Replace("%27", ""); } if (Request.QueryString["MM"] != null) { MM = Request.QueryString["MM"].ToString().Replace("%27", ""); } if (Request.QueryString["YY"] != null) { YY = Request.QueryString["YY"].ToString().Replace("%27", ""); } } if (RptName == "RptLrAndNr.rdlc") { if (Request.QueryString["FL"] != null) { FL = Request.QueryString["FL"].ToString().Replace("%27", ""); } if (Request.QueryString["BRCD"] != null) { BRCD = Request.QueryString["BRCD"].ToString().Replace("%27", ""); } if (Request.QueryString["ASONDATE"] != null) { ASONDT = Request.QueryString["ASONDATE"].ToString().Replace("%27", ""); } if (Request.QueryString["RECDIV"] != null) { RECDIV = Request.QueryString["RECDIV"].ToString().Replace("%27", ""); } if (Request.QueryString["RECCODE"] != null) { RECCODE = Request.QueryString["RECCODE"].ToString().Replace("%27", ""); } if (Request.QueryString["MM"] != null) { MM = Request.QueryString["MM"].ToString().Replace("%27", ""); } if (Request.QueryString["YY"] != null) { YY = Request.QueryString["YY"].ToString().Replace("%27", ""); } if (Request.QueryString["RECFOR"] != null) { RECFOR = Request.QueryString["RECFOR"].ToString().Replace("%27", ""); } } if (RptName == "RptRecoveryStatement.rdlc" || RptName == "RptRecoveryStatement_1009.rdlc" || RptName == "RptRecoveryStatement_1010.rdlc" || RptName == "RptRecoveryStatement_ALL.rdlc") { if (Request.QueryString["FL"] != null) { FL = Request.QueryString["FL"].ToString().Replace("%27", ""); } if (Request.QueryString["BRCD"] != null) { BRCD = Request.QueryString["BRCD"].ToString().Replace("%27", ""); } if (Request.QueryString["UID"] != null) { UID = Request.QueryString["UID"].ToString().Replace("%27", ""); } if (Request.QueryString["ASONDATE"] != null) { ASONDT = Request.QueryString["ASONDATE"].ToString().Replace("%27", ""); } if (Request.QueryString["RECDIV"] != null) { RECDIV = Request.QueryString["RECDIV"].ToString().Replace("%27", ""); } if (Request.QueryString["RECCODE"] != null) { RECCODE = Request.QueryString["RECCODE"].ToString().Replace("%27", ""); } if (Request.QueryString["MM"] != null) { MM = Request.QueryString["MM"].ToString().Replace("%27", ""); } if (Request.QueryString["YY"] != null) { YY = Request.QueryString["YY"].ToString().Replace("%27", ""); } if (Request.QueryString["RECFOR"] != null) { RECFOR = Request.QueryString["RECFOR"].ToString().Replace("%27", ""); } } if (RptName == "RptExRecBeforePost.rdlc") { if (Request.QueryString["REPTYPE"] != null) { REPTYPE = Request.QueryString["REPTYPE"].ToString().Replace("%27", ""); } if (Request.QueryString["BKCD"] != null) { BKCD = Request.QueryString["BKCD"].ToString().Replace("%27", ""); } if (Request.QueryString["FL"] != null) { FL = Request.QueryString["FL"].ToString().Replace("%27", ""); } if (Request.QueryString["SFL"] != null) { SFL = Request.QueryString["SFL"].ToString().Replace("%27", ""); } if (Request.QueryString["BRCD"] != null) { BRCD = Request.QueryString["BRCD"].ToString().Replace("%27", ""); } if (Request.QueryString["UID"] != null) { UID = Request.QueryString["UID"].ToString().Replace("%27", ""); } if (Request.QueryString["ASONDATE"] != null) { ASONDT = Request.QueryString["ASONDATE"].ToString().Replace("%27", ""); } if (Request.QueryString["RECDIV"] != null) { RECDIV = Request.QueryString["RECDIV"].ToString().Replace("%27", ""); } if (Request.QueryString["RECCODE"] != null) { RECCODE = Request.QueryString["RECCODE"].ToString().Replace("%27", ""); } if (Request.QueryString["MM"] != null) { MM = Request.QueryString["MM"].ToString().Replace("%27", ""); } if (Request.QueryString["YY"] != null) { YY = Request.QueryString["YY"].ToString().Replace("%27", ""); } if (Request.QueryString["RECFOR"] != null) { RECFOR = Request.QueryString["RECFOR"].ToString().Replace("%27", ""); } } if (RptName == "RptRecoveryAfterPost.rdlc") { if (Request.QueryString["FL"] != null) { FL = Request.QueryString["FL"].ToString().Replace("%27", ""); } if (Request.QueryString["BRCD"] != null) { BRCD = Request.QueryString["BRCD"].ToString().Replace("%27", ""); } if (Request.QueryString["UID"] != null) { UID = Request.QueryString["UID"].ToString().Replace("%27", ""); } if (Request.QueryString["ASONDATE"] != null) { ASONDT = Request.QueryString["ASONDATE"].ToString().Replace("%27", ""); } if (Request.QueryString["RECDIV"] != null) { RECDIV = Request.QueryString["RECDIV"].ToString().Replace("%27", ""); } if (Request.QueryString["RECCODE"] != null) { RECCODE = Request.QueryString["RECCODE"].ToString().Replace("%27", ""); } if (Request.QueryString["MM"] != null) { MM = Request.QueryString["MM"].ToString().Replace("%27", ""); } if (Request.QueryString["YY"] != null) { YY = Request.QueryString["YY"].ToString().Replace("%27", ""); } if (Request.QueryString["RECFOR"] != null) { RECFOR = Request.QueryString["RECFOR"].ToString().Replace("%27", ""); } } if (RptName == "RptPTRegister.rdlc") { if (Request.QueryString["FL"] != null) { FL = Request.QueryString["FL"].ToString().Replace("%27", ""); } if (Request.QueryString["BRCD"] != null) { BRCD = Request.QueryString["BRCD"].ToString().Replace("%27", ""); } if (Request.QueryString["UID"] != null) { UID = Request.QueryString["UID"].ToString().Replace("%27", ""); } if (Request.QueryString["MM"] != null) { MM = Request.QueryString["MM"].ToString().Replace("%27", ""); } if (Request.QueryString["ASONDATE"] != null) { ASONDT = Request.QueryString["ASONDATE"].ToString().Replace("%27", ""); } if (Request.QueryString["YY"] != null) { YY = Request.QueryString["YY"].ToString().Replace("%27", ""); } if (Request.QueryString["BANKCD"] != null) { BKCD = Request.QueryString["BANKCD"].ToString().Replace("%27", ""); } if (Request.QueryString["Div"] != null) { Div = Request.QueryString["Div"].ToString().Replace("%27", ""); } if (Request.QueryString["Dep"] != null) { Dep = Request.QueryString["Dep"].ToString().Replace("%27", ""); } } #endregion #region Calling Function DataSet thisDataSet = new DataSet(); DataSet thisDataSet1 = new DataSet(); if (RptName == "RptDemandSummary.rdlc") { thisDataSet = GetDemandRep(FL, FBRCD, TBRCD, MM, YY); if (thisDataSet == null || thisDataSet.Tables[0].Rows.Count == 0) { WebMsgBox.Show("Sorry No Record found......!!", this.Page); ClientScript.RegisterStartupScript(typeof(Page), "closePage", "window.close();", true); return; } } if (RptName == "RptDemandDetails.rdlc") { thisDataSet = GetDemandRep(FL, FBRCD, TBRCD, MM, YY); if (thisDataSet == null || thisDataSet.Tables[0].Rows.Count == 0) { WebMsgBox.Show("Sorry No Record found......!!", this.Page); ClientScript.RegisterStartupScript(typeof(Page), "closePage", "window.close();", true); return; } } if (RptName == "RptLrAndNr.rdlc") { thisDataSet = GetLrAndNr(BRCD, RECDIV, RECCODE, MM, YY); if (thisDataSet == null || thisDataSet.Tables[0].Rows.Count == 0) { WebMsgBox.Show("Sorry No Record found......!!", this.Page); ClientScript.RegisterStartupScript(typeof(Page), "closePage", "window.close();", true); return; } } // RptRecoveryStatement if (RptName == "RptRecoveryStatement.rdlc") { thisDataSet = GetRecoveryStatRep(BRCD, RECDIV, RECCODE, MM, YY); if (thisDataSet == null || thisDataSet.Tables[0].Rows.Count == 0) { WebMsgBox.Show("Sorry No Record found......!!", this.Page); ClientScript.RegisterStartupScript(typeof(Page), "closePage", "window.close();", true); return; } } if (RptName == "RptRecoveryStatement_1010.rdlc") { thisDataSet = GetRecoveryStatRep(BRCD, RECDIV, RECCODE, MM, YY); if (thisDataSet == null || thisDataSet.Tables[0].Rows.Count == 0) { WebMsgBox.Show("Sorry No Record found......!!", this.Page); ClientScript.RegisterStartupScript(typeof(Page), "closePage", "window.close();", true); return; } } if (RptName == "RptExRecBeforePost.rdlc") { thisDataSet = GetRecoveryExRep(FL, SFL, BRCD, RECDIV, RECCODE, MM, YY); if (thisDataSet == null || thisDataSet.Tables[0].Rows.Count == 0) { WebMsgBox.Show("Sorry No Record found......!!", this.Page); ClientScript.RegisterStartupScript(typeof(Page), "closePage", "window.close();", true); return; } } if (RptName == "RptRecoveryStatement_1009.rdlc" || RptName == "RptRecoveryStatement_ALL.rdlc") { thisDataSet = GetRecoveryStatRep_1009(BRCD, RECDIV, RECCODE, MM, YY); if (thisDataSet == null || thisDataSet.Tables[0].Rows.Count == 0) { WebMsgBox.Show("Sorry No Record found......!!", this.Page); ClientScript.RegisterStartupScript(typeof(Page), "closePage", "window.close();", true); return; } } // RptRecoveryStatement if (RptName == "RptRecoveryAfterPost.rdlc") { thisDataSet = GetRecoveryAftrePost(BRCD, RECDIV, RECCODE, MM, YY); if (thisDataSet == null || thisDataSet.Tables[0].Rows.Count == 0) { WebMsgBox.Show("Sorry No Record found......!!", this.Page); ClientScript.RegisterStartupScript(typeof(Page), "closePage", "window.close();", true); return; } } if (RptName == "RptRecoveryStatement_Total.rdlc") { thisDataSet = PT.GetRecoveryStatement_Total(ASONDT, BRCD, MM, YY, BKCD, Div, Dep); if (thisDataSet == null || thisDataSet.Tables[0].Rows.Count == 0) { WebMsgBox.Show("Sorry There Is No Record...!!", this.Page); ClientScript.RegisterStartupScript(typeof(Page), "closePage", "window.close();", true); return; } } if (RptName == "RptPTRegister.rdlc") { thisDataSet1 = PT.GetPtRegister(FL, ASONDT, BRCD, MM, YY, BKCD, Div, Dep); if (thisDataSet1 == null || thisDataSet1.Tables[0].Rows.Count == 0) { WebMsgBox.Show("Sorry There Is No Record...!!", this.Page); ClientScript.RegisterStartupScript(typeof(Page), "closePage", "window.close();", true); return; } } #endregion #region Report Parameter ReportDataSource DataSource = new ReportDataSource("ReportDS", thisDataSet.Tables["Table1"]); ReportDataSource DataSource1 = new ReportDataSource("ReportDS1", thisDataSet1.Tables["Table1"]); RdlcPrint.LocalReport.ReportPath = Server.MapPath("~/" + RptName + ""); RdlcPrint.LocalReport.DataSources.Clear(); RdlcPrint.LocalReport.DataSources.Add(DataSource); if (RptName == "RptBalanceS.rdlc") { RdlcPrint.LocalReport.DataSources.Add(DataSource); RdlcPrint.LocalReport.DataSources.Add(DataSource1); } if (RptName == "RptDlyCshPosWDenom.rdlc") { RdlcPrint.LocalReport.DataSources.Add(DataSource); RdlcPrint.LocalReport.DataSources.Add(DataSource1); } RdlcPrint.LocalReport.Refresh(); DataTable DT = new DataTable(); DT = LG.GetBankName(Session["BRCD"].ToString()); if (DT.Rows.Count > 0) { BkName = DT.Rows[0]["BankName"].ToString(); BrName = DT.Rows[0]["BranchName"].ToString(); } if (RptName == "RptDemandSummary.rdlc") { RptName = "Recovery DemandSummary"; ReportParameter rp1 = new ReportParameter("BANK_NAME", BkName.ToString()); ReportParameter rp2 = new ReportParameter("BRANCH_NAME", BrName.ToString()); ReportParameter rp3 = new ReportParameter("USER_NAME", Session["LOGINCODE"].ToString()); ReportParameter rp6 = new ReportParameter("YYYY", YY.ToString()); ReportParameter rp7 = new ReportParameter("MM", MM.ToString()); RdlcPrint.LocalReport.SetParameters(new ReportParameter[] { rp1, rp2, rp3, rp6, rp7 }); } if (RptName == "RptDemandDetails.rdlc") { RptName = "Recovery DemandDetails"; ReportParameter rp1 = new ReportParameter("BANK_NAME", BkName.ToString()); ReportParameter rp2 = new ReportParameter("BRANCH_NAME", BrName.ToString()); ReportParameter rp3 = new ReportParameter("USER_NAME", Session["LOGINCODE"].ToString()); ReportParameter rp6 = new ReportParameter("YYYY", YY.ToString()); ReportParameter rp7 = new ReportParameter("MM", MM.ToString()); RdlcPrint.LocalReport.SetParameters(new ReportParameter[] { rp1, rp2, rp3, rp6, rp7 }); } if (RptName == "RptLrAndNr.rdlc") { RptName = "Recovery Lr and Nr"; ReportParameter rp1 = new ReportParameter("BANK_NAME", BkName.ToString()); ReportParameter rp2 = new ReportParameter("BRANCH_NAME", BrName.ToString()); ReportParameter rp3 = new ReportParameter("USER_NAME", Session["LOGINCODE"].ToString()); ReportParameter rp4 = new ReportParameter("AS_ON_DATE", ASONDT.ToString()); ReportParameter rp5 = new ReportParameter("REC_FOR", RECFOR.ToString()); ReportParameter rp6 = new ReportParameter("YYYY", YY.ToString()); ReportParameter rp7 = new ReportParameter("MM", MM.ToString()); RdlcPrint.LocalReport.SetParameters(new ReportParameter[] { rp1, rp2, rp3, rp5, rp4, rp6, rp7 }); } if (RptName == "RptRecoveryStatement_Total.rdlc") { fileName = "Recovery Statement"; if (RptName == "RptRecoveryStatement_Total.rdlc") { RptName = "Recovery Statement"; ReportParameter rp1 = new ReportParameter("BANK_NAME", BkName.ToString()); ReportParameter rp2 = new ReportParameter("BRANCH_NAME", BrName.ToString()); ReportParameter rp3 = new ReportParameter("USER_NAME", UID.ToString()); ReportParameter rp4 = new ReportParameter("AS_ON_DATE", ASONDT.ToString()); ReportParameter rp5 = new ReportParameter("YYYY", YY.ToString()); ReportParameter rp6 = new ReportParameter("MM", MM.ToString()); RdlcPrint.LocalReport.SetParameters(new ReportParameter[] { rp1, rp2, rp3, rp4, rp5, rp6 }); } } if (RptName == "RptRecoveryAfterPost.rdlc") { fileName = "Recovery After Post"; if (RptName == "RptRecoveryAfterPost.rdlc") { RptName = "Recovery Statement"; ReportParameter rp1 = new ReportParameter("BANK_NAME", BkName.ToString()); ReportParameter rp2 = new ReportParameter("BRANCH_NAME", BrName.ToString()); ReportParameter rp3 = new ReportParameter("USER_NAME", UID.ToString()); ReportParameter rp4 = new ReportParameter("AS_ON_DATE", ASONDT.ToString()); ReportParameter rp5 = new ReportParameter("REC_FOR", RECFOR.ToString()); ReportParameter rp6 = new ReportParameter("YYYY", YY.ToString()); ReportParameter rp7 = new ReportParameter("MM", MM.ToString()); ReportParameter rp8 = new ReportParameter("REPORT_NAME", FL.ToString()); RdlcPrint.LocalReport.SetParameters(new ReportParameter[] { rp1, rp2, rp3, rp4, rp5, rp6, rp7, rp8 }); } } if (RptName == "RptRecoveryStatement.rdlc") { fileName = "Recovery Statement"; if (RptName == "RptRecoveryStatement.rdlc") { RptName = "Recovery Statement"; ReportParameter rp1 = new ReportParameter("BANK_NAME", BkName.ToString()); ReportParameter rp2 = new ReportParameter("BRANCH_NAME", BrName.ToString()); ReportParameter rp3 = new ReportParameter("USER_NAME", UID.ToString()); ReportParameter rp4 = new ReportParameter("AS_ON_DATE", ASONDT.ToString()); ReportParameter rp5 = new ReportParameter("REC_FOR", RECFOR.ToString()); ReportParameter rp6 = new ReportParameter("YYYY", YY.ToString()); ReportParameter rp7 = new ReportParameter("MM", MM.ToString()); ReportParameter rp8 = new ReportParameter("REPORT_NAME", FL.ToString()); RdlcPrint.LocalReport.SetParameters(new ReportParameter[] { rp1, rp2, rp3, rp4, rp5, rp6, rp7, rp8 }); } } if (RptName == "RptRecoveryStatement_1010.rdlc") { fileName = "Recovery Statement"; if (RptName == "RptRecoveryStatement_1010.rdlc") { RptName = "Recovery Statement"; ReportParameter rp1 = new ReportParameter("BANK_NAME", BkName.ToString()); ReportParameter rp2 = new ReportParameter("BRANCH_NAME", BrName.ToString()); ReportParameter rp3 = new ReportParameter("USER_NAME", UID.ToString()); ReportParameter rp4 = new ReportParameter("AS_ON_DATE", ASONDT.ToString()); ReportParameter rp5 = new ReportParameter("REC_FOR", RECFOR.ToString()); ReportParameter rp6 = new ReportParameter("YYYY", YY.ToString()); ReportParameter rp7 = new ReportParameter("MM", MM.ToString()); ReportParameter rp8 = new ReportParameter("REPORT_NAME", FL.ToString()); RdlcPrint.LocalReport.SetParameters(new ReportParameter[] { rp1, rp2, rp3, rp4, rp5, rp6, rp7, rp8 }); } } if (RptName == "RptRecoveryStatement_1009.rdlc" || RptName == "RptRecoveryStatement_ALL.rdlc") { fileName = "Recovery Statement"; if (RptName == "RptRecoveryStatement_1009.rdlc" || RptName == "RptRecoveryStatement_ALL.rdlc") { RptName = "Recovery Statement"; ReportParameter rp1 = new ReportParameter("BANK_NAME", BkName.ToString()); ReportParameter rp2 = new ReportParameter("BRANCH_NAME", BrName.ToString()); ReportParameter rp3 = new ReportParameter("USER_NAME", UID.ToString()); ReportParameter rp4 = new ReportParameter("AS_ON_DATE", ASONDT.ToString()); ReportParameter rp5 = new ReportParameter("REC_FOR", RECFOR.ToString()); ReportParameter rp6 = new ReportParameter("YYYY", YY.ToString()); ReportParameter rp7 = new ReportParameter("MM", MM.ToString()); ReportParameter rp8 = new ReportParameter("REPORT_NAME", FL.ToString()); RdlcPrint.LocalReport.SetParameters(new ReportParameter[] { rp1, rp2, rp3, rp4, rp5, rp6, rp7, rp8 }); } } if (RptName == "RptExRecBeforePost.rdlc") { fileName = "Recovery Statemen tEx Report"; if (RptName == "RptExRecBeforePost.rdlc") { RptName = "Recovery Statement"; ReportParameter rp1 = new ReportParameter("BANK_NAME", BkName.ToString()); ReportParameter rp2 = new ReportParameter("BRANCH_NAME", BrName.ToString()); ReportParameter rp3 = new ReportParameter("UserId", UID.ToString()); ReportParameter rp4 = new ReportParameter("AS_ON_DATE", ASONDT.ToString()); ReportParameter rp5 = new ReportParameter("REC_FOR", RECFOR.ToString()); ReportParameter rp6 = new ReportParameter("YYYY", YY.ToString()); ReportParameter rp7 = new ReportParameter("MM", MM.ToString()); ReportParameter rp8 = new ReportParameter("REPORT_NAME", "Excess Recovery Report Before Posting"); RdlcPrint.LocalReport.SetParameters(new ReportParameter[] { rp1, rp2, rp3, rp4, rp5, rp6, rp7, rp8 }); } } if (RptName == "RptPTRegister.rdlc") { fileName = "P.T Register"; ReportParameter rp1 = new ReportParameter("BANK_NAME", BkName.ToString()); ReportParameter rp2 = new ReportParameter("BRANCH_NAME", BrName.ToString()); ReportParameter rp3 = new ReportParameter("USER_NAME", UID.ToString()); RdlcPrint.LocalReport.SetParameters(new ReportParameter[] { rp1, rp2, rp3 }); } } }
protected void Page_Load(object sender, EventArgs e) { if (string.IsNullOrEmpty(Request["zId"])) { // if (!string.IsNullOrEmpty(Request["zId"]) && !IsPostBack) Response.Redirect("~/About.aspx"); } _wz = Int32.Parse(Request["zId"]); if (User.Identity.Name != "ODS14") { Treg.Visible = false; Tzak.Visible = false; } if (!IsPostBack) { App_Code.Base db = new App_Code.Base(WebConfigurationManager.ConnectionStrings["DefaultConnection"].ToString()); DataTable data = db.GetEvent(_wz); if (data.Rows.Count < 1) { Response.Redirect("~/About.aspx"); } Id.Text = _wz.ToString(); Sourse.Text = data.Rows[0]["Sourse"].ToString(); Text1.Text = data.Rows[0]["Sourse"].ToString(); IO.Text = data.Rows[0]["IO"].ToString(); DataId.Text = data.Rows[0]["DataId"].ToString(); dateReg = ((DateTime)data.Rows[0]["DataId"]); if (!string.IsNullOrEmpty(data.Rows[0]["DataId"].ToString())) { yyy = ((DateTime)data.Rows[0]["DataId"]).Year.ToString(); ddd = ((DateTime)data.Rows[0]["DataId"]).Day.ToString(); momo = ((DateTime)data.Rows[0]["DataId"]).Month.ToString(); hhh = ((DateTime)data.Rows[0]["DataId"]).Hour.ToString(); mmm = ((DateTime)data.Rows[0]["DataId"]).Minute.ToString(); } RegistrId.Text = data.Rows[0]["RegistrId"].ToString(); LiftId.Text = data.Rows[0]["LiftId"].ToString(); TextBox4.Text = data.Rows[0]["LiftId"].ToString(); TypeId.Text = data.Rows[0]["TypeId"].ToString(); EventId.Text = data.Rows[0]["EventId"].ToString(); Text.Text = data.Rows[0]["EventId"].ToString(); ToApp.Text = data.Rows[0]["ToApp"].ToString(); Text2.Text = data.Rows[0]["ToApp"].ToString(); DateToApp.Text = data.Rows[0]["DateToApp"].ToString(); if (!string.IsNullOrEmpty(data.Rows[0]["DateToApp"].ToString())) { yyy1 = ((DateTime)data.Rows[0]["DateToApp"]).Year.ToString(); ddd1 = ((DateTime)data.Rows[0]["DateToApp"]).Day.ToString(); momo1 = ((DateTime)data.Rows[0]["DateToApp"]).Month.ToString(); hhh1 = ((DateTime)data.Rows[0]["DateToApp"]).Hour.ToString(); mmm1 = ((DateTime)data.Rows[0]["DateToApp"]).Minute.ToString(); } Who.Text = data.Rows[0]["Who"].ToString(); Comment.Text = data.Rows[0]["Comment"].ToString(); Text5.Text = data.Rows[0]["Prim"].ToString(); Prim.Text = data.Rows[0]["Prim"].ToString(); DateWho.Text = data.Rows[0]["DateWho"].ToString(); // TextBox3.Text = data.Rows[0]["DateWho"].ToString(); // if (string.IsNullOrEmpty(TextBox3.Text)) // TextBox3.Text = Convert.ToString(DateTime.Now); string d = string.Empty; string d2 = string.Empty, t2 = string.Empty; TimeSpan pr = DateTime.Now - ((DateTime)data.Rows[0]["DataId"]); if (!(data.Rows[0]["DateWho"] is DBNull)) { d2 = ((DateTime)data.Rows[0]["DateWho"]).Date.ToString(); t2 = ((DateTime)data.Rows[0]["DateWho"]).TimeOfDay.ToString(); pr = ((DateTime)data.Rows[0]["DateWho"]) - ((DateTime)data.Rows[0]["DataId"]); } if (!(data.Rows[0]["DateToApp"] is DBNull)) { d = ((DateTime)data.Rows[0]["DateToApp"]).ToString(); } string prostoy = ((int)pr.TotalDays).ToString() + " " + pr.Hours.ToString() + ":" + pr.Minutes.ToString(); Timing.Text = prostoy; { yyy2 = DateTime.Now.Year.ToString(); ddd2 = DateTime.Now.Day.ToString(); momo2 = DateTime.Now.Month.ToString(); hhh2 = DateTime.Now.Hour.ToString(); mmm2 = DateTime.Now.Minute.ToString(); } } //Год/месяц/день List <string> yy = new List <string>() { yyy, "2016", "2017", "2018", "2019", "2020" }; if (!IsPostBack) { YY.DataSource = yy; YY.DataBind(); YY.SelectedIndex = 0; } List <string> yy1 = new List <string>() { yyy1, "2016", "2017", "2018", "2019", "2020" }; if (!IsPostBack) { YY1.DataSource = yy1; YY1.DataBind(); YY1.SelectedIndex = 0; } List <string> yy2 = new List <string>() { yyy2, "2016", "2017", "2018", "2019", "2020" }; if (!IsPostBack) { YY2.DataSource = yy2; YY2.DataBind(); YY2.SelectedIndex = 0; } List <string> mo = new List <string>() { momo, "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12" }; if (!IsPostBack) { MO.DataSource = mo; MO.DataBind(); MO.SelectedIndex = 0; } List <string> mo1 = new List <string>() { momo1, "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12" }; if (!IsPostBack) { MO1.DataSource = mo1; MO1.DataBind(); MO1.SelectedIndex = 0; } List <string> mo2 = new List <string>() { momo2, "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12" }; if (!IsPostBack) { MO2.DataSource = mo2; MO2.DataBind(); MO2.SelectedIndex = 0; } List <string> dd = new List <string>() { ddd, "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31" }; if (!IsPostBack) { DD.DataSource = dd; DD.DataBind(); DD.SelectedIndex = 0; } List <string> dd1 = new List <string>() { ddd1, "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31" }; if (!IsPostBack) { DD1.DataSource = dd1; DD1.DataBind(); DD1.SelectedIndex = 0; } List <string> dd2 = new List <string>() { ddd2, "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31" }; if (!IsPostBack) { DD2.DataSource = dd2; DD2.DataBind(); DD2.SelectedIndex = 0; } //Часы/минуты List <string> hh = new List <string>() { hhh, "0", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23" }; if (!IsPostBack) { HH.DataSource = hh; HH.DataBind(); HH.SelectedIndex = 0; } List <string> hh1 = new List <string>() { hhh1, "0", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23" }; if (!IsPostBack) { HH1.DataSource = hh1; HH1.DataBind(); HH1.SelectedIndex = 0; } List <string> hh2 = new List <string>() { hhh2, "0", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23" }; if (!IsPostBack) { HH2.DataSource = hh2; HH2.DataBind(); HH2.SelectedIndex = 0; } List <string> mm = new List <string>() { mmm, "05", "10", "15", "20", "25", "30", "35", "40", "45", "50", "55", "00" }; if (!IsPostBack) { MM.DataSource = mm; MM.DataBind(); MM.SelectedIndex = 0; } List <string> mm1 = new List <string>() { mmm1, "05", "10", "15", "20", "25", "30", "35", "40", "45", "50", "55", "00" }; if (!IsPostBack) { MM1.DataSource = mm1; MM1.DataBind(); MM1.SelectedIndex = 0; } List <string> mm2 = new List <string>() { mmm2, "05", "10", "15", "20", "25", "30", "35", "40", "45", "50", "55", "00" }; if (!IsPostBack) { MM2.DataSource = mm2; MM2.DataBind(); MM2.SelectedIndex = 0; } //Диспетчер using (SqlConnection conn = new SqlConnection(WebConfigurationManager.ConnectionStrings["DefaultConnection"].ToString())) { conn.Open(); SqlCommand cmd = new SqlCommand("select p.surname, p.name, p.midlename from People p " + "where p.comments=@user and p.specialty=N'диспетчер'", conn); cmd.Parameters.AddWithValue("user", User.Identity.Name); List <string> iodisp = new List <string>() { IO.Text }; SqlDataReader dr = cmd.ExecuteReader(); while (dr.Read()) { iodisp.Add(dr[0].ToString() + " " + dr[1].ToString() + " " + dr[2].ToString()); } dr.Close(); if (!IsPostBack) { FIO.DataSource = iodisp; FIO.DataBind(); FIO.SelectedIndex = 0; Fdr.Visible = false; TextBox5.Text = IO.Text; } } //Механик List <string> worker = new List <string>() { ToApp.Text }; if (!IsPostBack) { Workers.DataSource = worker; Workers0.DataSource = worker; Workers.DataBind(); Workers0.DataBind(); Workers.SelectedIndex = 0; Workers0.SelectedIndex = 0; Worker_TextChanged(this, EventArgs.Empty); } if (RegistrId.Text == "Эксплуатация лифтов") { Wrk.Visible = true; Wrk0.Visible = true; Text2.Visible = false; Text3.Visible = false; } else { Wrk.Visible = false; Wrk0.Visible = false; Text2.Visible = true; Text3.Visible = true; } }
public void SetPosition(Vector3D p, Vector3D l, Vector3D u) { _p = p; _l = l; _u = u; Z.Set(p); Z.Sub(l); Z.Normalize(); X = Vector3D.CrossProduct(u, Z); X.Normalize(); Y = Vector3D.CrossProduct(Z, X); ZZ.Set(Z); ZZ.Multiply(nearD); nc.Set(p); nc.Sub(ZZ); ZZ.Set(Z); ZZ.Multiply(farD); fc.Set(p); fc.Sub(ZZ); // ntl = nc + Y * nh - X * nw; // ntr = nc + Y * nh + X * nw; // nbl = nc - Y * nh - X * nw; // nbr = nc - Y * nh + X * nw; YY.Set(Y); YY.Multiply(nh); XX.Set(X); XX.Multiply(nw); ntl.Set(nc); ntl.Add(YY); ntl.Sub(XX); ntr.Set(nc); ntr.Add(YY); ntr.Add(XX); nbl.Set(nc); nbl.Sub(YY); nbl.Sub(XX); nbr.Set(nc); nbr.Sub(YY); nbr.Add(XX); // ftl = fc + Y * fh - X * fw; // ftr = fc + Y * fh + X * fw; // fbl = fc - Y * fh - X * fw; // fbr = fc - Y * fh + X * fw; YY.Set(Y); YY.Multiply(fh); XX.Set(X); XX.Multiply(fw); ftl.Set(fc); ftl.Add(YY); ftl.Sub(XX); ftr.Set(fc); ftr.Add(YY); ftr.Add(XX); fbl.Set(fc); fbl.Sub(YY); fbl.Sub(XX); fbr.Set(fc); fbr.Sub(YY); fbr.Add(XX); pl[TOP].Set3Points(ntr, ntl, ftl); pl[BOTTOM].Set3Points(nbl, nbr, fbr); pl[LEFT].Set3Points(ntl, nbl, fbl); pl[RIGHT].Set3Points(nbr, ntr, fbr); pl[NEARP].Set3Points(ntl, ntr, nbr); pl[FARP].Set3Points(ftr, ftl, fbl); }