public DataTable GetCOUNT_SUBMIT() { DataCollections col = new DataCollections("P_GET_COUNT_SUBMIT_BY_USERID"); col.Add(DataTypes.Number, "@userid", FieldTypes.Criterion, CGlobal.GetUserID(), "="); return(dao.exeSelectPro(col, "P_GET_COUNT_SUBMIT_BY_USERID")); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { var global = new CGlobal(); //ddlHours.DataSource = global.GetDictionary(150); //ddlHours.DataTextField = "Name"; //ddlHours.DataValueField = "Value"; //ddlHours.DataBind(); ddlProgramType.DataSource = global.GetDictionary(1285); ddlProgramType.DataTextField = "Name"; ddlProgramType.DataValueField = "Value"; ddlProgramType.DataBind(); ddlComType.DataSource = global.GetDictionary(1286); ddlComType.DataTextField = "Name"; ddlComType.DataValueField = "Value"; ddlComType.DataBind(); ResetForm(); } RefreshProgramList(); RefreshTuition(); RadComboBoxProgramGroup.OpenDropDownOnLoad = false; }
protected void Dropdown_StudentlList(int DormitoryRegistrationId, int StudentId) { ddlStudent.Items.Clear(); var cglobal = new CGlobal(); int SiteLocationId = CurrentSiteLocationId; if (StudentId > 0) { var cStudentRequest = new CDormitoryRegistrations(); SiteLocationId = cStudentRequest.SiteLocationbyStudentId(StudentId); } ddlStudent.DataSource = cglobal.LoadStudentList(SiteLocationId); //CurrentSiteLocationId ddlStudent.DataTextField = "Name"; ddlStudent.DataValueField = "Value"; ddlStudent.Filter = (RadComboBoxFilter)Convert.ToInt32(1); ddlStudent.Items.Insert(0, new RadComboBoxItem("", "0")); if (StudentId > 0) { ddlStudent.SelectedValue = StudentId.ToString(); } else if (StudentId == 0 && DormitoryRegistrationId > 0) { ddlStudent.SelectedValue = GetStudentId(DormitoryRegistrationId).ToString(); } else if (DormitoryRegistrationId == 0 && StudentId == 0) { ddlStudent.SelectedIndex = 0; } ddlStudent.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { CGlobal.SetSessionTitleAdmin("THÔNG TIN CHUNG"); } }
public DataTable LoadByUserID(int filter) { int iResult = 1; DataCollections col = new DataCollections("V_" + TABLE_NAME); col.Add(DataTypes.NVarchar, "*", FieldTypes.DefaultValue, "", ""); col.Add(DataTypes.NVarchar, "UserId", FieldTypes.Criterion, CGlobal.GetUserID(), "="); switch (filter) { case 1: // dc phe duyet col.Add(DataTypes.Number, "IsAccepted", FieldTypes.Criterion, 1, "="); // col.FILTER = " DateAccept IS NOT NULL"; col.ORDERBY = " ORDER BY DateAccept desc"; break; case 2: //chua phe duyet col.Add(DataTypes.Number, "IsAccepted", FieldTypes.Criterion, 0, "="); // col.FILTER = " DateAccept IS NULL"; col.ORDERBY = " ORDER BY DateRequest desc"; break; default: // dang hoc col.Add(DataTypes.DateTime, "EndTime", FieldTypes.Criterion, DateTime.Now, ">"); col.Add(DataTypes.DateTime, "StartTime", FieldTypes.Criterion, DateTime.Now, "<"); // col.FILTER = " DateAccept IS NOT NULL"; col.Add(DataTypes.Number, "IsAccepted", FieldTypes.Criterion, 1, "="); col.ORDERBY = " ORDER BY DateAccept desc"; break; } return(dao.DoQuery(col, ref iResult)); }
public DataTable LoadByUserID() { DataCollections _col = new DataCollections("P_AllContest"); _col.Add(DataTypes.NVarchar, "UserId", FieldTypes.Criterion, CGlobal.GetUserID(), "="); return(dao.exeSelectPro(_col, "P_AllContest")); }
private void initForm() { HELPER.CWebPage.PageSizeToVietnames(grvData); HELPER.CWebPage.FormatPanel(pnEdit); CGlobal.SetSessionTitleAdmin("QUẢN TRỊ NGƯỜI DÙNG"); objUser.LoadType(cboUserType); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { PageBase p = (PageBase)Page; var cUserPermission = new CUserPermission(); var userPermissionList = cUserPermission.GetUserPermissionModelList(p.CurrentUserId); foreach (var userPermission in userPermissionList) { foreach (int index in Enum.GetValues(typeof(CConstValue.Menu))) { // permission type == Access (0) if (userPermission.MenuId == index && userPermission.IsAccess) { GetMenuItem(RadMenu1.Items, Enum.GetName(typeof(CConstValue.Menu), index).ToLower()); } } } var logoPath = new CGlobal().GetLogoImagePath(p.CurrentSiteLocationId, CConstValue.ImageType.Small); if (logoPath != string.Empty) { try { RadBinaryImageSiteLogo.DataValue = File.ReadAllBytes(logoPath); } catch (Exception ex) { Debug.Print(ex.Message); } } } }
private void initForm() { uplChooseFile.Attributes.Add("onchange", "return CheckFile(this);"); //check dung lượng và định dạng file tải lên BUS_Compiler objCompiler = new BUS_Compiler(); CGlobal.LoadToCombo(cboCompiler, false, objCompiler.selectEnable(), "Name", "ID"); }
protected void Dropdown_StudentlList(int StudentId) { ddlStudent.Items.Clear(); var cglobal = new CGlobal(); int SiteLocationId = CurrentSiteLocationId; if (StudentId > 0) { var cStudentRequest = new CDormitoryRegistrations(); SiteLocationId = cStudentRequest.SiteLocationbyStudentId(StudentId); } ddlStudent.DataSource = cglobal.LoadStudentList(SiteLocationId);//CurrentSiteLocationId ddlStudent.DataTextField = "Name"; ddlStudent.DataValueField = "Value"; if (StudentId == 0) { ddlStudent.SelectedIndex = 0; } else { ddlStudent.SelectedValue = StudentId.ToString(); } ddlStudent.DataBind(); }
public long Insert() { DataCollections _col = GetObject(); _col.Add(DataTypes.Number, "UserId", FieldTypes.DefaultValue, CGlobal.GetUserID(), ""); _col.Add(DataTypes.DateTime, "DateRequest", FieldTypes.DefaultValue, DateTime.Now, ""); return(dao.DoInsertReturnID(_col)); }
public DataTable LoadBySearch(int status) { DataCollections col = new DataCollections("P_GetAllMyNotiByUser"); col.Add(DataTypes.Number, "@userid", FieldTypes.Criterion, CGlobal.GetUserID(), "="); col.Add(DataTypes.Number, "@notiStatus", FieldTypes.Criterion, (status + 1), "="); return(dao.exeSelectPro(col, "P_GetAllMyNotiByUser")); }
public long Insert() { DataCollections _col = GetObject(); _col.Add(DataTypes.Number, "CreatedBy", FieldTypes.DefaultValue, CGlobal.GetUserID(), ""); _col.Add(DataTypes.DateTime, "ModifiedOn", FieldTypes.DefaultValue, DateTime.Now.Date, ""); return(dao.DoInsertReturnID(_col)); }
public DataTable GetMyNotiByUser(int notiMax) { DataCollections col = new DataCollections("P_GetMyNotiByUser"); col.Add(DataTypes.Number, "@userid", FieldTypes.Criterion, CGlobal.GetUserID(), "="); col.Add(DataTypes.Number, "@notiMax", FieldTypes.Criterion, notiMax, "="); return(dao.exeSelectPro(col, "P_GetMyNotiByUser")); }
public bool UpdatePointByID(long point) { DataCollections _col = GetObject(); _col.Add(DataTypes.Number, "ID", FieldTypes.Criterion, CGlobal.GetUserID(), "="); _col.Add(DataTypes.Number, "Point", FieldTypes.DefaultValue, point, ""); return(dao.DoUpdate(_col)); }
public CLodSphere(bool outer, CPlanet planet) { CGlobal global = CGlobal.GetInstance(); m_Planet = planet; if (outer) { // outer atmosphere m_Material = (Material)Material.Instantiate(global.OuterAtmosphereMaterial); } else { // inner atmosphere m_Material = (Material)Material.Instantiate(global.InnerAtmosphereMaterial); } m_Material.SetFloat("_planetRadius", m_Planet.m_Radius); m_Material.SetFloat("_atmosRadius", m_Planet.AtmosRadius); m_Material.SetColor("_color1", m_Planet.m_AtmosColor1); m_Material.SetColor("_color2", m_Planet.m_AtmosColor2); m_Material.SetFloat("_sunIntensity", m_Planet.m_sunIntensity); m_Material.SetFloat("_horizonHeight", m_Planet.m_HorizonHeight); m_Material.SetFloat("_horizonIntensity", m_Planet.m_HorizonIntensity); m_Material.SetFloat("_horizonPower", m_Planet.m_HorizonPower); m_Material.SetFloat("_minAlpha", m_Planet.m_MinAtmosAlpha); m_Spheres = new GameObject[3]; // lod is 0:lowest, 1:mid, 2:highest detail for (int i = 0; i < 3; i++) { // save original parent transformations Vector3 parentPos = m_Planet.gameObject.transform.position; Quaternion parentQua = m_Planet.gameObject.transform.rotation; // reset parent transformations before assigning mesh data (so our vertices will be centered on the parent transform) m_Planet.gameObject.transform.position = Vector3.zero; m_Planet.gameObject.transform.rotation = Quaternion.identity; m_Spheres[i] = new GameObject("atmos lod " + i); m_Spheres[i].AddComponent <MeshFilter>(); m_Spheres[i].AddComponent <MeshRenderer>(); // ### outer atmosphere tesselation should be using AtmosSlices and AtmosStacks configs from CPatchConfig... m_Spheres[i].GetComponent <MeshFilter>().sharedMesh = global.MakeSphere((outer ? m_Planet.AtmosRadius : m_Planet.AtmosRadius * 1.25f), 15 * ((i + 1) * 4), 11 * ((i + 1) * 4)); m_Spheres[i].transform.parent = m_Planet.gameObject.transform; m_Spheres[i].renderer.sharedMaterial = m_Material; // restore parent transformations m_Planet.gameObject.transform.position = parentPos; m_Planet.gameObject.transform.rotation = parentQua; // inactivate this gameobject m_Spheres[i].hideFlags = HideFlags.HideInHierarchy | HideFlags.HideInInspector | HideFlags.NotEditable; } }
public DataTable LoadNotAcceptedByCreated() { int iResult = 1; DataCollections col = new DataCollections("V_Accepted"); col.Add(DataTypes.NVarchar, "*", FieldTypes.DefaultValue, "", ""); col.Add(DataTypes.Number, "createdby", FieldTypes.Criterion, CGlobal.GetUserID(), "="); return(dao.DoQuery(col, ref iResult)); }
public static CGlobal GetInstance() { if (m_GlobalInstance == null) { m_GlobalInstance = new CGlobal(); } return(m_GlobalInstance); }
public bool UpdateByAdminType(long id, int type) { DataCollections _col = new DataCollections(TABLE_NAME); _col.Add(DataTypes.NVarchar, "ID", FieldTypes.Criterion, id, "="); _col.Add(DataTypes.Number, "UserType", FieldTypes.DefaultValue, type, ""); _col.Add(DataTypes.Number, "AcceptBy", FieldTypes.DefaultValue, CGlobal.GetUserID(), ""); return(dao.DoUpdate(_col)); }
protected void LoadSiteLocation(string siteId) { var global = new CGlobal(); RadComboBoxSiteLocation.DataSource = global.GetSiteLocationBySiteId(Convert.ToInt32(siteId)); RadComboBoxSiteLocation.DataTextField = "Name"; RadComboBoxSiteLocation.DataValueField = "Value"; RadComboBoxSiteLocation.DataBind(); }
private DataCollections GetObject() { DataCollections _col = new DataCollections(TABLE_NAME); _col.Add(DataTypes.Number, "CreatedBy", FieldTypes.DefaultValue, CGlobal.GetUserID(), ""); _col.Add(DataTypes.NVarchar, "Content", FieldTypes.DefaultValue, Content, ""); _col.Add(DataTypes.Number, "NotiType", FieldTypes.DefaultValue, NotiType, ""); return(_col); }
public DataTable LoadByUserID() { int iResult = 1; DataCollections col = new DataCollections("V_" + TABLE_NAME); col.Add(DataTypes.NVarchar, "*", FieldTypes.DefaultValue, "", ""); col.Add(DataTypes.NVarchar, "UserID", FieldTypes.Criterion, CGlobal.GetUserID(), "="); return(dao.DoQuery(col, ref iResult)); }
public static CGlobal GetInstance() { if (m_GlobalInstance == null) { m_GlobalInstance = new CGlobal(); } return m_GlobalInstance; }
public RCertification(int invoiceId) { // // Required for telerik Reporting designer support // InitializeComponent(); var invoice = new CInvoice().Get(invoiceId); if (invoice?.ProgramRegistrationId == null) { return; } var programRegistration = new CProgramRegistration().Get((int)invoice.ProgramRegistrationId); if (programRegistration == null) { return; } var cStudent = new CStudent(); var student = cStudent.Get((int)invoice.StudentId); if (student == null) { return; } var program = new CProgram().Get(programRegistration.ProgramId); var siteLocation = new CSiteLocation().Get(student.SiteLocationId); var site = new CSite().Get(siteLocation.SiteId); var weeks = programRegistration.Weeks == null ? string.Empty : programRegistration.Weeks + " weeks"; var programDescription = program.ProgramFullName + (programRegistration.HrsStatus != null ? $"({programRegistration.HrsStatus}/week)" : string.Empty) + " Program"; htmlTextBoxBody.Value = $@"This Certification awarded to<br> <b>{cStudent.GetStudentFullName(student)}</b><br> for successfully completing {weeks} in the<br> <b>{programDescription}</b><br> at {site.Name}, {siteLocation.Name}, ON, Canada"; htmlTextBoxDate.Value = $"Dated : <b>{DateTime.Today.ToString("MM-dd-yy")}</b>"; try { var signPath = new CGlobal().GetLogoImagePath((int)invoice.SiteLocationId, CConstValue.ImageType.Sign); if (signPath != string.Empty) { pictureBoxSign.Value = Image.FromFile(signPath); } } catch (Exception ex) { Debug.Print(ex.Message); } }
public long Insert() { DataCollections _col = new DataCollections(TABLE_NAME); _col.Add(DataTypes.Number, "CreatedBy", FieldTypes.DefaultValue, CGlobal.GetUserID(), ""); _col.Add(DataTypes.NVarchar, "Content", FieldTypes.DefaultValue, Content, ""); _col.Add(DataTypes.Number, "NotiType", FieldTypes.DefaultValue, NotiType, ""); return(dao.DoInsertReturnID(_col)); }
public bool Update() { DataCollections _col = new DataCollections(TABLE_NAME); _col.Add(DataTypes.NVarchar, "Id", FieldTypes.Criterion, Id, "="); _col.Add(DataTypes.Number, "CreatedBy", FieldTypes.DefaultValue, CGlobal.GetUserID(), ""); _col.Add(DataTypes.NVarchar, "Content", FieldTypes.DefaultValue, Content, ""); _col.Add(DataTypes.Number, "NotiType", FieldTypes.DefaultValue, NotiType, ""); return(dao.DoUpdate(_col)); }
protected void LoadSiteLocation(string SiteId) { var global = new CGlobal(); ddlSiteLocation.DataSource = global.GetSiteLocationBySiteId(Convert.ToInt32(SiteId)); ddlSiteLocation.DataTextField = "Name"; ddlSiteLocation.DataValueField = "Value"; ddlSiteLocation.DataBind(); ddlSiteLocation.Items.Insert(0, new RadComboBoxItem("-Select Location-", "0")); }
// uses GPU to accumulate layers of noise public static void Execute(CNoiseLayer layer, RenderTexture noiseRT, CBoundingVolume volume, bool flip, float planetRadius) { CGlobal global = CGlobal.GetInstance(); int matidx = 0; float amp = 1.0f; float frequency = layer.m_Frequency; switch (layer.m_LayerType) { case NoiseLayerType.Cell: { Debug.Log("[ETHEREA1] NoiseLayerType.Cell is not implemented yet! Please select Ridged or Turbulence instead."); break; } case NoiseLayerType.Ridged: { matidx = 0; break; } case NoiseLayerType.Turbulence: { matidx = 1; break; } } for (int i = 0; i < layer.m_Octaves; i++) { RenderTexture.active = noiseRT; global.GenNoiseMaterial[matidx].SetFloat("_planetRadius", planetRadius); global.GenNoiseMaterial[matidx].SetVector("_noiseOffset", layer.m_NoiseOffset); global.GenNoiseMaterial[matidx].SetFloat("_offset", layer.m_Offset); global.GenNoiseMaterial[matidx].SetFloat("_hpower", layer.m_HPower); global.GenNoiseMaterial[matidx].SetTexture("_permTexture", global.PermTex); global.GenNoiseMaterial[matidx].SetTexture("_simplexTexture", global.SimplexTex); global.GenNoiseMaterial[matidx].SetFloat("_contribution", layer.m_Contribution); global.GenNoiseMaterial[matidx].SetTexture("_previousPass", noiseRT); global.GenNoiseMaterial[matidx].SetFloat("_amp", amp); global.GenNoiseMaterial[matidx].SetFloat("_frequency", frequency); // ### render with extended volume coordinates but with normal uv volume coordinates //global.RenderQuadVolumeExCoord(noiseRT.width, noiseRT.height, global.GenNoiseMaterial[matidx], volume, flip); global.RenderQuadVolume(noiseRT.width, noiseRT.height, global.GenNoiseMaterial[matidx], volume, flip); frequency *= layer.m_Lacunarity; amp *= layer.m_Persistence; RenderTexture.active = null; } }
protected void Page_Load(object sender, EventArgs e) { // find user control _radGridInvoiceItems = InvoiceItemGrid1.GetRadGridInvoiceItems(); // connect event of invoice Items. _radGridInvoiceItems.PreRender += _radGridInvoiceItems_PreRender; _radGridInvoiceItems.MasterTableView.DataSourceID = null; _radGridInvoiceItems.DataSourceID = null; // just view InvoiceItemGrid1.SetEditMode(false); Id = Convert.ToInt32(Request["id"]); if (!IsPostBack) { var global = new CGlobal(); var cStudent = new CStudent(); var student = cStudent.Get(Id); var studentSite = new CSiteLocation().Get(student.SiteLocationId); StudentSiteId = studentSite.SiteId; StudentSiteLocationId = student.SiteLocationId; LoadAgency(); LoadFaculty(); LoadProgramGroup("0"); LoadProgram("0"); ddlProgramWeeks.DataSource = new CProgram().GetProgramWeeksList(); ddlProgramWeeks.DataTextField = "Name"; ddlProgramWeeks.DataValueField = "Value"; ddlProgramWeeks.DataBind(); ddlPrgHours.DataSource = global.GetDictionary(150); ddlPrgHours.DataTextField = "Name"; ddlPrgHours.DataValueField = "Value"; ddlPrgHours.DataBind(); var cCountry = new CCountry().Get((int)student.CountryId); var cCountryMarket = new CCountryMarket().Get((int)cCountry.CountryMarketId); ViewState["CountryMarketId"] = cCountry.CountryMarketId; ttName1.Text = cStudent.GetStudentName(student) + " [" + student.StudentNo + "]"; ttName2.Text = cCountryMarket.Name; } ddlAgency.OpenDropDownOnLoad = false; ddlFaculty.OpenDropDownOnLoad = false; ddlProgramGrp.OpenDropDownOnLoad = false; ddlProgramName.OpenDropDownOnLoad = false; ddlProgramWeeks.OpenDropDownOnLoad = false; ddlPrgHours.OpenDropDownOnLoad = false; }
protected void Dropdown_Campus() { ddlSiteLocation.Items.Clear(); var global = new CGlobal(); ddlSiteLocation.DataSource = global.GetSiteLocationBySiteId(CurrentSiteId); ddlSiteLocation.DataTextField = "Name"; ddlSiteLocation.DataValueField = "Value"; ddlSiteLocation.SelectedIndex = 0; ddlSiteLocation.DataBind(); }
protected void LoadSite(int siteId) { var global = new CGlobal(); RadComboBoxSite.Items.Clear(); RadComboBoxSite.Text = string.Empty; RadComboBoxSite.DataSource = global.GetSiteId(siteId); RadComboBoxSite.DataTextField = "Name"; RadComboBoxSite.DataValueField = "Value"; RadComboBoxSite.DataBind(); }